protected function executeCommandHook($method, $event_type)
    {
        foreach ($this->getCommandsByMethodEventType($method, $event_type) as $command) {
            if (is_string($command)) {
                $command = (new CommandHook())
                    ->setType('raw')
                    ->setCommand($command);
            } elseif (is_array($command)) {
                $command = CommandHook::createWithData($command);
            }

            if (!$command instanceof CommandHookInterface) {
                continue;
            }

            switch ($command->getType()) {
                case 'symfony':
                    $this->executeSymfonyCmdHook($command, $method);
                    break;
                default:
                    $this->executeEngineCmdHook($command);
                    break;
            }
        }

        return $this;
    }