Ojs\CoreBundle\Command\MailEventsSynchronizeCommand::execute PHP Метод

execute() защищенный Метод

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Результат void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->io->title('Synchronize all mail events.');
        $mailEventClassChain = $this->container->get('ojs_core.mail.event_chain')->getMailEvents();
        foreach ($mailEventClassChain as $mailEventClass) {
            if ($mailEventClass instanceof MailEventsInterface) {
                $getEvensOptions = $mailEventClass->getMailEventsOptions();
                foreach ($getEvensOptions as $eventOption) {
                    if ($eventOption instanceof EventDetail) {
                        $this->startMailEventSync($eventOption);
                    } else {
                        throw new \LogicException('all array item must be instance of EventDetail Class');
                    }
                }
            }
        }
    }