/** * 通过插件名,批量注册被观察的插件 * @return void */ public static function loadPlugins() { $dispatcher = Plugin::getInstance(); $dispatcher->loadEvents(self::getEventNames()); }
/** * (non-PHPdoc) * @see \libsrv\AbstractService::modifyByPk() */ public function modifyByPk($value, array $params = array()) { $dispatcher = Plugin::getInstance(); $dispatcher->trigger('onBeforeSave', array(__METHOD__, &$params, $value)); return parent::modifyByPk($value, $params); }