示例#1
0
文件: Alpha.php 项目: phpdn/framework
 /**
  * 未找到控制器的时候设置勾子
  *
  */
 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');
 }
示例#2
0
 /**
  * 挂载插件钩子
  *
  */
 public function __destruct()
 {
     Plugin::hook('alpha.run_controller_end');
 }