aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textreparser/manager.php
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2016-12-18 01:28:51 -0800
committerMatt Friedman <maf675@gmail.com>2016-12-18 01:28:51 -0800
commitb4748a5d1ee31084da7e78f8ffaf5b036f2e5314 (patch)
treeeb815b485b6360235bbc04413b2f682215cc1efe /phpBB/phpbb/textreparser/manager.php
parent544c7c4e0864df7ad1748c21b92a146e84308a06 (diff)
downloadforums-b4748a5d1ee31084da7e78f8ffaf5b036f2e5314.tar
forums-b4748a5d1ee31084da7e78f8ffaf5b036f2e5314.tar.gz
forums-b4748a5d1ee31084da7e78f8ffaf5b036f2e5314.tar.bz2
forums-b4748a5d1ee31084da7e78f8ffaf5b036f2e5314.tar.xz
forums-b4748a5d1ee31084da7e78f8ffaf5b036f2e5314.zip
[ticket/14925] Set reparser names in service definitions
PHPBB3-14925
Diffstat (limited to 'phpBB/phpbb/textreparser/manager.php')
-rw-r--r--phpBB/phpbb/textreparser/manager.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/phpbb/textreparser/manager.php b/phpBB/phpbb/textreparser/manager.php
index fddd867923..7ca65d708d 100644
--- a/phpBB/phpbb/textreparser/manager.php
+++ b/phpBB/phpbb/textreparser/manager.php
@@ -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;
+ }
}