Exemplo n.º 1
0
 /**
  * 未找到控制器的时候设置勾子
  *
  */
 public static function montFor404Page()
 {
     Plugin::mount('alpha.before_show_404_page', array(function () {
         $cmdLists = Config::get('framework_system_command');
         $cmd = strtolower(trim(Route::$urlParams['path'], DIRECTORY_SEPARATOR));
         if (isset($cmdLists[$cmd])) {
             call_user_func($cmdLists[$cmd]);
         }
     }));
     Plugin::hook('alpha.before_show_404_page');
 }
Exemplo n.º 2
0
 /**
  * 挂载插件钩子
  *
  */
 public function __destruct()
 {
     Plugin::hook('alpha.run_controller_end');
 }