1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/11152] Convert cron_task_collection to generic di_service_collection

PHPBB3-11152
This commit is contained in:
Igor Wiedler
2012-11-10 16:38:19 +01:00
parent 38e1c4ec5d
commit 798c006e7f
2 changed files with 8 additions and 8 deletions

View File

@@ -1,49 +0,0 @@
<?php
/**
*
* @package phpBB3
* @copyright (c) 2011 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\TaggedContainerInterface;
/**
* Collects cron tasks
*
* @package phpBB3
*/
class phpbb_cron_task_collection extends ArrayObject
{
/**
* Constructor
*
* @param TaggedContainerInterface $container Container object
*/
public function __construct(TaggedContainerInterface $container)
{
$this->container = $container;
}
/**
* Add a cron task to the collection
*
* @param string $name The service name of the cron task
* @return null
*/
public function add($name)
{
$task = $this->container->get($name);
$task->set_name($name);
$this->offsetSet($name, $task);
}
}