1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 07:07:51 +02:00

[ticket/13691] Add services when the iterator requested

PHPBB3-13691
This commit is contained in:
Mate Bartus 2015-06-24 15:15:38 +02:00
parent f5b476b221
commit a34a65afdc

View File

@ -43,6 +43,19 @@ class ordered_service_collection extends service_collection
parent::__construct($container);
}
/**
* {@inheritdoc}
*/
public function getIterator()
{
if (!$this->is_ordered)
{
$this->sort_services();
}
return new service_collection_iterator($this);
}
/**
* {@inheritdoc}
*/