mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/14925] Set reparser names in service definitions
PHPBB3-14925
This commit is contained in:
@@ -125,4 +125,24 @@ class manager
|
||||
$this->schedule($reparser, $interval);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a reparser by name.
|
||||
*
|
||||
* If there is no reparser with the specified name, null is returned.
|
||||
*
|
||||
* @param string $name Name of the reparser to look up.
|
||||
* @return string A reparser service name, or null.
|
||||
*/
|
||||
public function find_reparser($name)
|
||||
{
|
||||
foreach ($this->reparsers as $service => $reparser)
|
||||
{
|
||||
if ($reparser->get_name() == $name)
|
||||
{
|
||||
return $service;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user