PHP Classes

File: examples/library/bootstrap.php

Recommend this page to a friend!
  Classes of Victor Bolshov   Tiny PHP ORM Framework   examples/library/bootstrap.php   Download  
File: examples/library/bootstrap.php
Role: Application script
Content type: text/plain
Description: Application script
Class: Tiny PHP ORM Framework
Map objects to databases using composed queries
Author: By
Last change: Heaviliy refactored & improved EntityGenerator; removed custom autoloader; added stored configurations for entity generator
Date: 6 years ago
Size: 624 bytes
 

Contents

Class file image Download
<?php

use \library\Registry,
    \
tinyorm\Select;

error_reporting(E_ALL);
ini_set("display_errors", "On");
ini_set("log_errors", "Off");

define("TODOLIST_ROOT", __DIR__ . "/");

// tinyorm autoload
include_once TODOLIST_ROOT . "../../vendor/autoload.php";

// application autoload
include_once TODOLIST_ROOT . "lib/autoload.inc";

// configuration
$config = include TODOLIST_ROOT . "etc/config.base.php";

$override = TODOLIST_ROOT . "etc/config.override.php";
if (
is_file($override)) {
   
$config = array_merge($config, include $override);
}

Registry::loadConfig($config);
Select::setDefaultConnection(Registry::db());