diff options
author | Mate Bartus <mate.bartus@gmail.com> | 2015-06-24 15:15:38 +0200 |
---|---|---|
committer | Mate Bartus <mate.bartus@gmail.com> | 2015-06-24 15:15:38 +0200 |
commit | a34a65afdce363aed65d037576278aef4484b753 (patch) | |
tree | 4691fa75785dc880119584a0145f6728d065f22c /phpBB | |
parent | f5b476b221d2fec5cb5886ca6174b3e7c27b1cba (diff) | |
download | forums-a34a65afdce363aed65d037576278aef4484b753.tar forums-a34a65afdce363aed65d037576278aef4484b753.tar.gz forums-a34a65afdce363aed65d037576278aef4484b753.tar.bz2 forums-a34a65afdce363aed65d037576278aef4484b753.tar.xz forums-a34a65afdce363aed65d037576278aef4484b753.zip |
[ticket/13691] Add services when the iterator requested
PHPBB3-13691
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/phpbb/di/service_collection/ordered_service_collection.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/phpbb/di/service_collection/ordered_service_collection.php b/phpBB/phpbb/di/service_collection/ordered_service_collection.php index 01d0914ad4..f012abcd09 100644 --- a/phpBB/phpbb/di/service_collection/ordered_service_collection.php +++ b/phpBB/phpbb/di/service_collection/ordered_service_collection.php @@ -46,6 +46,19 @@ class ordered_service_collection extends service_collection /** * {@inheritdoc} */ + public function getIterator() + { + if (!$this->is_ordered) + { + $this->sort_services(); + } + + return new service_collection_iterator($this); + } + + /** + * {@inheritdoc} + */ public function offsetExists($index) { if (!$this->is_ordered) |