preActions = $preActions; $this->registry = $registry; $this->createPreActions(); } protected function createPreActions() { foreach ($this->preActions as $preAction){ $this->handlers[] = $this->registry->create(\Phacil\Framework\Action::class, $preAction); } } /** {@inheritdoc} */ public function getHandlers() { return $this->handlers; } /** * @param int $actionKey * @return void */ public function executedActionHandler($actionKey){ unset($this->handlers[$actionKey]); } }