Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of PharIo\Manifest.
4
 *
5
 * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace PharIo\Manifest;
11
 
12
class BundledComponentCollection implements \Countable, \IteratorAggregate {
13
    /** @var BundledComponent[] */
14
    private $bundledComponents = [];
15
 
16
    public function add(BundledComponent $bundledComponent): void {
17
        $this->bundledComponents[] = $bundledComponent;
18
    }
19
 
20
    /**
21
     * @return BundledComponent[]
22
     */
23
    public function getBundledComponents(): array {
24
        return $this->bundledComponents;
25
    }
26
 
27
    public function count(): int {
28
        return \count($this->bundledComponents);
29
    }
30
 
31
    public function getIterator(): BundledComponentCollectionIterator {
32
        return new BundledComponentCollectionIterator($this);
33
    }
34
}