aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textreparser/manager.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-12-18 19:33:42 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-12-18 19:33:42 +0100
commitfd19ef7598a5d84485f4864bfcac36beef959a7c (patch)
treeaeabd554b44448eb0555209da45543b1312c8c04 /phpBB/phpbb/textreparser/manager.php
parentf84c3687cce0e4dc1868016c14e416047013d784 (diff)
parent76e9f4dd2d45e8f128e59e1378dfd6778eec9d48 (diff)
downloadforums-fd19ef7598a5d84485f4864bfcac36beef959a7c.tar
forums-fd19ef7598a5d84485f4864bfcac36beef959a7c.tar.gz
forums-fd19ef7598a5d84485f4864bfcac36beef959a7c.tar.bz2
forums-fd19ef7598a5d84485f4864bfcac36beef959a7c.tar.xz
forums-fd19ef7598a5d84485f4864bfcac36beef959a7c.zip
Merge pull request #4585 from VSEphpbb/ticket/14925
[ticket/14925] Set reparser names in service definitions
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;
+ }
}