Ejemplo n.º 1
0
 public function process()
 {
     if (\PMVC\getOption(Event\FINISH) || !\PMVC\exists('dispatcher', 'plugin')) {
         return $this->onFinish();
     } else {
         // only need trigger when process
         \PMVC\plug('dispatcher')->attachAfter($this, Event\FINISH);
     }
 }
Ejemplo n.º 2
0
 private function _getPrivateDb($key)
 {
     if (\PMVC\exists($this['private_db'], 'plugin')) {
         $private = \PMVC\plug($this['private_db']);
         $this->dbs[$key] = $private->getDb($key);
         return true;
     } else {
         return false;
     }
 }
Ejemplo n.º 3
0
 public function process()
 {
     if (\PMVC\getOption(Event\FINISH) || !\PMVC\exists('dispatcher', 'plugin')) {
         // run directly if miss event
         return $this->onFinish();
     } else {
         // only run by finish event
         \PMVC\plug('dispatcher')->attachAfter($this, Event\FINISH);
     }
 }
Ejemplo n.º 4
0
 function tearDown()
 {
     if (\PMVC\exists($this->_plug, 'plugin')) {
         \PMVC\unplug($this->_plug);
     }
 }