From 87a13a8c77adbdb72ab686ebd5b26e2e9f961140 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sat, 14 Jun 2014 15:00:35 +0200 Subject: [ticket/12575] Pass service_collection instead of ContainerInterface. PHPBB3-12575 --- phpBB/phpbb/di/service_collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/di/service_collection.php') diff --git a/phpBB/phpbb/di/service_collection.php b/phpBB/phpbb/di/service_collection.php index a8eeeab8bb..4d0cb64114 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 -- cgit v1.2.1 From 04e2fcd4d8d4e7364b234c072b31f1560461a006 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sat, 14 Jun 2014 19:01:53 +0200 Subject: [ticket/12575] Just forward service_collection::offsetGet() to container. PHPBB3-12575 --- phpBB/phpbb/di/service_collection.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'phpBB/phpbb/di/service_collection.php') diff --git a/phpBB/phpbb/di/service_collection.php b/phpBB/phpbb/di/service_collection.php index 4d0cb64114..82ca9bf679 100644 --- a/phpBB/phpbb/di/service_collection.php +++ b/phpBB/phpbb/di/service_collection.php @@ -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); } /** -- cgit v1.2.1