public function __construct() { $system = System::getInstance(); $system->log('INFO', 'Helper instantiated'); }
public function __construct() { parent::__construct(); }
// set VERSION constant for version number define('VERSION', '0.1'); // set BASE_PATH constant define("BASE_PATH", __DIR__); /* set error reporting */ if (ENVIRONMENT == 'development') { error_reporting(E_ALL); } else { error_reporting(0); } /* require semi-manual autoloader and autoload files */ require_once SYSTEM_PATH . '/Autoload.php'; spl_autoload_register(array('system\\Autoload', 'load')); // load config $config = new application\config\Config(); // if there is no constructor, use default one if (!isset($_GET['controller'])) { $index = $config->get('index'); } else { $index = $_GET['controller']; } // if there is no "action", use default one if (!isset($_GET['action'])) { $action = 'index'; } else { $action = $_GET['action']; } // load system class and start use system\System; $system = System::getInstance(); $system->run($index, $action, $_GET);