コード例 #1
0
ファイル: Panel.php プロジェクト: williamamed/Raptor2
 public function call(\Raptor\Raptor $app)
 {
     if (!$app->config('debug')) {
         return false;
     }
     \Raptor\Raptor::getInstance()->hook('slim.after', array($this, 'registerLastPerformance'));
     if (!$app->request()->isXhr()) {
         \Raptor\Raptor::getInstance()->hook('slim.after', array($this, 'createPanel'));
     }
     return false;
 }
コード例 #2
0
ファイル: Main.php プロジェクト: williamamed/Raptor2
 public function init(\Raptor\Raptor $app)
 {
     //        Place your init code here
     /**
      * This make Raptor load the control panel from the root path
      * if the config mode is debug wich is taken by Raptor like
      * DEV mode
      * 
      * PROBABLY YOU NEED TO REMOVE THIS IN PRODUCTION MODE
      */
     if ($app->config('debug')) {
         $app->any('/', function () use($app) {
             $app->redirect($app->request()->getScriptName() . '/raptor');
         });
     }
 }