phpbb\console\command\reparser\reparse::execute PHP Method

execute() protected method

Executes the command reparser:reparse
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return integer
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;
        $this->io = new SymfonyStyle($input, $output);
        if (!$this->reparse_lock->acquire()) {
            throw new runtime_exception('REPARSE_LOCK_ERROR', array(), null, 1);
        }
        $name = $input->getArgument('reparser-name');
        if ($name) {
            $name = $this->reparser_manager->find_reparser($name);
            $this->reparse($name);
        } else {
            foreach ($this->reparsers as $name => $service) {
                $this->reparse($name);
            }
        }
        $this->io->success($this->user->lang('CLI_REPARSER_REPARSE_SUCCESS'));
        $this->reparse_lock->release();
        return 0;
    }