phpci/bootstrap.php
Dan Cryer 2b709d25e8 Fix
2013-05-15 19:37:56 +01:00

34 lines
742 B
PHP

<?php
date_default_timezone_set(@date_default_timezone_get());
spl_autoload_register(function ($class)
{
$file = str_replace(array('\\', '_'), '/', $class);
$file .= '.php';
if(substr($file, 0, 1) == '/')
{
$file = substr($file, 1);
}
if(is_file(dirname(__FILE__) . '/' . $file))
{
include(dirname(__FILE__) . '/' . $file);
return;
}
}, true, true);
define('APPLICATION_PATH', dirname(__FILE__) . '/');
require_once('vendor/autoload.php');
if(file_exists(APPLICATION_PATH . 'config.php'))
{
require('config.php');
}
b8\Registry::getInstance()->set('app_namespace', 'PHPCI');
b8\Registry::getInstance()->set('DefaultController', 'Index');
b8\Registry::getInstance()->set('ViewPath', dirname(__FILE__) . '/PHPCI/View/');