1
0
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:
Matt Friedman
2016-12-18 01:28:51 -08:00
parent 544c7c4e08
commit b4748a5d1e
7 changed files with 87 additions and 14 deletions

View File

@@ -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;
}
}