aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/di
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/di')
-rw-r--r--phpBB/includes/di/pass/cron.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/phpBB/includes/di/pass/cron.php b/phpBB/includes/di/pass/cron.php
new file mode 100644
index 0000000000..b5fc4af9fc
--- /dev/null
+++ b/phpBB/includes/di/pass/cron.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+
+class phpbb_di_pass_cron implements CompilerPassInterface
+{
+ /**
+ * Modify the container before it is passed to the rest of the code
+ *
+ * @param ContainerBuilder $container ContainerBuilder object
+ * @return null
+ */
+ public function process(ContainerBuilder $container)
+ {
+ $definition = $container->getDefinition('cron.task_collection');
+
+ foreach ($container->findTaggedServiceIds('cron.task') as $id => $data)
+ {
+ $definition->addMethodCall('offsetSet', array(null, $id));
+ }
+ }
+}