<?php namespace app; use lib\Configure; chdir('..'); $root_dir = getcwd(); $locus_dir = 'C:/var/www/vhosts/locus'; require $locus_dir . '/conf/init.php'; require $root_dir . '/conf/conf.php'; require $root_dir . '/conf/routes.php'; Configure::write('root_dir', $root_dir); Configure::write('locus_dir', $locus_dir); try { $routes->path(); } catch (Exception $e) { include 'errors/fatal_error.php'; }
<?php namespace app; use lib\Configure; Configure::getInstance(); Configure::write('version', '0.1.3'); Configure::write('database', array('connect' => 'mongodb://localhost:27017', 'database' => 'timesheet')); Configure::write('template_engine', 'dwoo'); use lib\db\Mongo; Mongo::getInstance(); Mongo::init(Configure::read('database'));