Exemplo n.º 1
0
 public function init()
 {
     if (empty($this['output'])) {
         $this['output'] = 'debug_console';
     }
     if (empty($this['truncate'])) {
         $this['truncate'] = 100;
     }
     p\callPlugin('dispatcher', 'attach', [$this, 'SetConfig__run_form_']);
     $this->setLevelType(\PMVC\value($_REQUEST, [INPUT_FIELD]), false);
 }
Exemplo n.º 2
0
 public function onFinish()
 {
     $view = $this->_getView();
     if (empty(\PMVC\plug('view'))) {
         print_r($view->get('debugs'));
         return;
     }
     if (!empty($view->get('debugs'))) {
         $c = p\plug('controller');
         $mapping = $c->getMapping();
         if (!$mapping->forwardExists('debug')) {
             throw new UnderflowException('Can\'t find debug forward.');
         }
         $debug = $mapping->findForward('debug');
         p\callPlugin('dispatcher', 'stop', [false]);
         $c->processForward($debug);
     }
 }
Exemplo n.º 3
0
 public function init()
 {
     $this->_change(p\getOption(_VIEW_ENGINE));
     p\callPlugin('dispatcher', 'attach', [$this, 'SetConfig__view_engine_']);
 }