phpci/bootstrap.php

28 lines
634 B
PHP
Raw Normal View History

2013-05-03 17:02:53 +02:00
<?php
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');
require_once('config.php');
b8\Registry::getInstance()->set('app_namespace', 'PHPCI');
b8\Registry::getInstance()->set('DefaultController', 'Index');
b8\Registry::getInstance()->set('ViewPath', dirname(__FILE__) . '/PHPCI/View/');