1 | <?php declare(strict_types = 1); |
||
15 | final class ServiceInflector implements ServiceInflectorContract |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var ArgumentResolverContract |
||
20 | */ |
||
21 | private $argumentResolver; |
||
22 | |||
23 | /** |
||
24 | * A list of methods with arguments which will be invoked on the subject object. |
||
25 | * |
||
26 | * @var string[][] |
||
27 | */ |
||
28 | private $inflections = []; |
||
29 | |||
30 | /** |
||
31 | * ServiceInflector constructor. |
||
32 | * |
||
33 | * @param ArgumentResolverContract $argumentResolver |
||
34 | */ |
||
35 | 47 | public function __construct(ArgumentResolverContract $argumentResolver) |
|
39 | |||
40 | /** |
||
41 | * @inheritDoc |
||
42 | */ |
||
43 | 5 | public function addInflection(string $id, string $method, array $arguments = []) |
|
51 | |||
52 | /** |
||
53 | * @inheritDoc |
||
54 | */ |
||
55 | 28 | public function inflect($object) |
|
83 | |||
84 | } |