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:
@@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user