find_reparser() public method

If there is no reparser with the specified name, null is returned.
public find_reparser ( string $name ) : string
$name string Name of the reparser to look up.
return string A reparser service name, or null.
コード例 #1
0
ファイル: reparser.php プロジェクト: phpbb/phpbb
 /**
  * Sets the reparser for this cron task
  *
  * @param string	$reparser
  */
 public function set_reparser($reparser)
 {
     $this->reparser_name = !isset($this->reparsers[$reparser]) ? $this->reparser_manager->find_reparser($reparser) : $reparser;
     if ($this->resume_data === null) {
         $this->reparser_manager->get_resume_data($this->reparser_name);
     }
 }
コード例 #2
0
ファイル: reparse.php プロジェクト: phpbb/phpbb
 /**
  * Executes the command reparser:reparse
  *
  * @param InputInterface $input
  * @param OutputInterface $output
  * @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;
 }