| 1 | <?php |
||
| 7 | class Service { |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $id; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $class; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var Service[] |
||
| 21 | */ |
||
| 22 | private $arguments; |
||
| 23 | |||
| 24 | public function __construct(string $id, string $class = '', Service ...$arguments) { |
||
| 25 | $this->id = $id; |
||
| 26 | $this->class = $class; |
||
| 27 | $this->arguments = $arguments; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getId(): string { |
||
| 31 | return $this->id; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getClass(): string { |
||
| 35 | return $this->class; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return Service[] |
||
| 40 | */ |
||
| 41 | public function getArguments(): array { |
||
| 42 | return $this->arguments; |
||
| 43 | } |
||
| 44 | } |
||
| 45 |