[ Index ] |
PHP Cross Reference of phpBB-3.3.12-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 14 namespace phpbb\di; 15 16 /** 17 * Iterator which loads the services when they are requested 18 */ 19 class service_collection_iterator extends \ArrayIterator 20 { 21 /** 22 * @var \phpbb\di\service_collection 23 */ 24 protected $collection; 25 26 /** 27 * Construct an ArrayIterator for service_collection 28 * 29 * @param \phpbb\di\service_collection $collection The collection to iterate over 30 * @param int $flags Flags to control the behaviour of the ArrayObject object. 31 * @see ArrayObject::setFlags() 32 */ 33 public function __construct(service_collection $collection, $flags = 0) 34 { 35 parent::__construct($collection->getArrayCopy(), $flags); 36 $this->collection = $collection; 37 } 38 39 /** 40 * {@inheritdoc} 41 */ 42 public function current() 43 { 44 return $this->collection->offsetGet($this->key()); 45 } 46 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Jun 23 12:25:44 2024 | Cross-referenced by PHPXref 0.7.1 |