Refactoring to support updated b8framework.
This commit is contained in:
parent
aff5b1886e
commit
67386df9ef
20 changed files with 140 additions and 79 deletions
|
|
@ -36,16 +36,18 @@ if (!defined('APPLICATION_PATH')) {
|
|||
require_once(APPLICATION_PATH . 'vendor/autoload.php');
|
||||
|
||||
// Load configuration if present:
|
||||
$config = new b8\Config();
|
||||
|
||||
if (file_exists(APPLICATION_PATH . 'config.php')) {
|
||||
require(APPLICATION_PATH . 'config.php');
|
||||
|
||||
// Define our PHPCI_URL, if not already defined:
|
||||
if (!defined('PHPCI_URL')) {
|
||||
define('PHPCI_URL', $registry->get('install_url', '') . '/');
|
||||
define('PHPCI_URL', $config->get('install_url', '') . '/');
|
||||
}
|
||||
}
|
||||
|
||||
// Set up the registry:
|
||||
b8\Registry::getInstance()->set('app_namespace', 'PHPCI');
|
||||
b8\Registry::getInstance()->set('DefaultController', 'Index');
|
||||
b8\Registry::getInstance()->set('ViewPath', dirname(__FILE__) . '/PHPCI/View/');
|
||||
$config->set('app_namespace', 'PHPCI');
|
||||
$config->set('default_controller', 'Index');
|
||||
$config->set('view_path', dirname(__FILE__) . '/PHPCI/View/');
|
||||
Loading…
Add table
Add a link
Reference in a new issue