mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11152] Convert cron_task_collection to generic di_service_collection
PHPBB3-11152
This commit is contained in:
parent
38e1c4ec5d
commit
798c006e7f
2 changed files with 8 additions and 8 deletions
|
@ -45,7 +45,7 @@ services:
|
||||||
- %tables.config%
|
- %tables.config%
|
||||||
|
|
||||||
cron.task_collection:
|
cron.task_collection:
|
||||||
class: phpbb_cron_task_collection
|
class: phpbb_di_service_collection
|
||||||
arguments:
|
arguments:
|
||||||
- @service_container
|
- @service_container
|
||||||
|
|
||||||
|
|
|
@ -15,29 +15,29 @@ if (!defined('IN_PHPBB'))
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
use Symfony\Component\DependencyInjection\TaggedContainerInterface;
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collects cron tasks
|
* Collection of services to be configured at container compile time.
|
||||||
*
|
*
|
||||||
* @package phpBB3
|
* @package phpBB3
|
||||||
*/
|
*/
|
||||||
class phpbb_cron_task_collection extends ArrayObject
|
class phpbb_di_service_collection extends ArrayObject
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param TaggedContainerInterface $container Container object
|
* @param ContainerInterface $container Container object
|
||||||
*/
|
*/
|
||||||
public function __construct(TaggedContainerInterface $container)
|
public function __construct(ContainerInterface $container)
|
||||||
{
|
{
|
||||||
$this->container = $container;
|
$this->container = $container;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a cron task to the collection
|
* Add a service to the collection
|
||||||
*
|
*
|
||||||
* @param string $name The service name of the cron task
|
* @param string $name The service name
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
public function add($name)
|
public function add($name)
|
Loading…
Add table
Reference in a new issue