/** * Run the Application Controller * * @return void */ public static function run() { Events::dispatch('APPLICATION', 'RUN'); self::$request = Request::get_instance(); // Load the application settings self::load_application_settings(); Events::dispatch('APPLICATION', 'LOADED'); Events::dispatch('APPLICATION', 'HANDOFF'); self::$request->app['path'] = APP_PATH; self::$request->app['main_controller'] = APP_CONTROLLER; // Try to load the Application Controller $appclass = APP_CONTROLLER; self::$app = new $appclass(); Events::dispatch('APPLICATION', 'COMPLETE'); }
/** * Debugger initialization * * Registers the exception handler * * @return boolean */ public static function init() { // Ensure that the framework has not been loaded yet if (self::$loaded == true) { return FALSE; } // The variable has been loaded; self::$loaded = TRUE; // Register the error handlers set_exception_handler(__NAMESPACE__ . '\\Debug::exception'); set_error_handler(__NAMESPACE__ . '\\Debug::error'); // Register a template event handler // Note: Dynamic loader probably doesn't exist yet require_once PATH_LIB . '/class.events.php'; Events::add_event_listener('TEMPLATE', 'BEFORE_HTML_END', __CLASS__, 'render_console'); if (defined('SERVER_MODE') && SERVER_MODE == 'DEBUG') { error_reporting(E_ALL); } return TRUE; }
?> | <strong>Line:</strong> <?php echo $trace['line']; ?> </p> </li> <?php } ?> </ul> </div> </div> </div><!-- #content --> <footer> <p id="elusive" class="credits">The Elusive Framework was created by <a href="http://www.elusive-concepts.com" target="_blank">Elusive Concepts</a></p> </footer> </div> <?php /*$this->render('console');*/ echo \elusive\lib\Events::dispatch('TEMPLATE', 'BEFORE_HTML_END', ''); ?> </body> </html>