aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/di/service_collection.php
diff options
context:
space:
mode:
authorDhruv Goel <dhruv.goel92@gmail.com>2014-06-15 13:12:42 +0530
committerDhruv Goel <dhruv.goel92@gmail.com>2014-06-15 13:12:42 +0530
commit3a96c5b753cbbde459f9835e952b2cb75008a9fc (patch)
treed9e5e03de0c547dd84251104879d335623a2ef63 /phpBB/phpbb/di/service_collection.php
parent587759bd6a8d8bdeea6f8497db7b97f70fde383a (diff)
parent04e2fcd4d8d4e7364b234c072b31f1560461a006 (diff)
downloadforums-3a96c5b753cbbde459f9835e952b2cb75008a9fc.tar
forums-3a96c5b753cbbde459f9835e952b2cb75008a9fc.tar.gz
forums-3a96c5b753cbbde459f9835e952b2cb75008a9fc.tar.bz2
forums-3a96c5b753cbbde459f9835e952b2cb75008a9fc.tar.xz
forums-3a96c5b753cbbde459f9835e952b2cb75008a9fc.zip
Merge pull request #2593 from bantu/ticket/12575
[ticket/12575] Cleanup service_collection_iterator
Diffstat (limited to 'phpBB/phpbb/di/service_collection.php')
-rw-r--r--phpBB/phpbb/di/service_collection.php11
1 files changed, 2 insertions, 9 deletions
diff --git a/phpBB/phpbb/di/service_collection.php b/phpBB/phpbb/di/service_collection.php
index a8eeeab8bb..82ca9bf679 100644
--- a/phpBB/phpbb/di/service_collection.php
+++ b/phpBB/phpbb/di/service_collection.php
@@ -40,7 +40,7 @@ class service_collection extends \ArrayObject
*/
public function getIterator()
{
- return new service_collection_iterator($this->container, $this);
+ return new service_collection_iterator($this);
}
// Because of a PHP issue we have to redefine offsetExists
@@ -63,14 +63,7 @@ class service_collection extends \ArrayObject
*/
public function offsetGet($index)
{
- $task = parent::offsetGet($index);
- if ($task === null)
- {
- $task = $this->container->get($index);
- $this->offsetSet($index, $task);
- }
-
- return $task;
+ return $this->container->get($index);
}
/**