1 | <?php |
||
10 | final class AddToArray |
||
11 | { |
||
12 | private $serviceName; |
||
13 | |||
14 | /** |
||
15 | * @param string $serviceName The identifier of the service that is added to the array |
||
16 | */ |
||
17 | public function __construct($serviceName) |
||
21 | |||
22 | /** |
||
23 | * Returns the identifier of the service that is added to the array. |
||
24 | * |
||
25 | * @return string |
||
26 | */ |
||
27 | public function getAddedService() |
||
31 | |||
32 | /** |
||
33 | * Extend the array by adding a new service to it. |
||
34 | * The array is created if it does not exist yet. |
||
35 | * |
||
36 | * @param ContainerInterface $container |
||
37 | * @param array $previous |
||
38 | * |
||
39 | * @return array |
||
40 | */ |
||
41 | public function __invoke(ContainerInterface $container, array $previous = []) |
||
46 | } |
||
47 |