/** * 通过插件名,批量注册被观察的插件 * @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()) { $rowCount = parent::modifyByPk($value, $params); if ($rowCount === false) { return false; } $groupIds = $this->getFormProcessor()->group_ids; if (is_array($groupIds)) { $rowCount = $this->_userGroups->modify($value, $groupIds); } $dispatcher = Plugin::getInstance(); $dispatcher->trigger('onAfterSave', array(__METHOD__, &$params, $value)); return true; }