1 | <?php declare(strict_types=1); |
||
9 | class DefinitionAggregate implements DefinitionAggregateInterface |
||
10 | { |
||
11 | use ContainerAwareTrait; |
||
12 | |||
13 | /** |
||
14 | * @var \League\Container\Definition\DefinitionInterface[] |
||
15 | */ |
||
16 | protected $definitions = []; |
||
17 | |||
18 | /** |
||
19 | * Construct. |
||
20 | * |
||
21 | * @param \League\Container\Definition\DefinitionInterface[] $definitions |
||
22 | */ |
||
23 | public function __construct(array $definitions = []) |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | 36 | public function add(string $id, $definition, bool $shared = false): DefinitionInterface |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 30 | public function has(string $id): bool |
|
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | 18 | public function hasTag(string $tag): bool |
|
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | 21 | public function getDefinition(string $id): DefinitionInterface |
|
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | 15 | public function resolve(string $id, bool $new = false) |
|
96 | |||
97 | /** |
||
98 | * {@inheritdoc} |
||
99 | */ |
||
100 | 6 | public function resolveTagged(string $tag, bool $new = false): array |
|
112 | |||
113 | /** |
||
114 | * {@inheritdoc} |
||
115 | */ |
||
116 | 42 | public function getIterator(): Generator |
|
124 | } |
||
125 |