public function addRule(RuleInterface $rule) { if (!isset($this->rules[$rule->getEvent()])) { $this->rules[$rule->getEvent()] = array(); } $this->rules[$rule->getEvent()][] = $rule; }
protected function dispatchActionEvents(RuleInterface $rule, Event $event) { foreach ($rule->getActionEvents() as $item) { $actionEvent = $this->mapper->buildActionEvent($item, $event); if ($actionEvent) { $this->dispatcher->dispatch($item->getName(), $actionEvent, $item->getDelay()); } } }