Chris@14: , Sebastian Heuer , Sebastian Bergmann Chris@14: * Chris@14: * For the full copyright and license information, please view the LICENSE Chris@14: * file that was distributed with this source code. Chris@14: */ Chris@14: Chris@14: namespace PharIo\Manifest; Chris@14: Chris@14: class BundledComponentCollection implements \Countable, \IteratorAggregate { Chris@14: /** Chris@14: * @var BundledComponent[] Chris@14: */ Chris@14: private $bundledComponents = []; Chris@14: Chris@14: public function add(BundledComponent $bundledComponent) { Chris@14: $this->bundledComponents[] = $bundledComponent; Chris@14: } Chris@14: Chris@14: /** Chris@14: * @return BundledComponent[] Chris@14: */ Chris@14: public function getBundledComponents() { Chris@14: return $this->bundledComponents; Chris@14: } Chris@14: Chris@14: /** Chris@14: * @return int Chris@14: */ Chris@14: public function count() { Chris@14: return count($this->bundledComponents); Chris@14: } Chris@14: Chris@14: /** Chris@14: * @return BundledComponentCollectionIterator Chris@14: */ Chris@14: public function getIterator() { Chris@14: return new BundledComponentCollectionIterator($this); Chris@14: } Chris@14: }