mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[ticket/13691] Add services when the iterator requested
PHPBB3-13691
This commit is contained in:
parent
f5b476b221
commit
a34a65afdc
1 changed files with 13 additions and 0 deletions
|
@ -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}
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue