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); } }
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; } }
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); } }
function tearDown() { if (\PMVC\exists($this->_plug, 'plugin')) { \PMVC\unplug($this->_plug); } }