1 | <?php |
||
22 | class ObjectHydrator implements ObjectHydratorInterface |
||
23 | { |
||
24 | |||
25 | /** |
||
26 | * @var Inspector |
||
27 | */ |
||
28 | private $inspector; |
||
29 | |||
30 | /** |
||
31 | * @var mixed |
||
32 | */ |
||
33 | private $object; |
||
34 | |||
35 | /** |
||
36 | * Methods to implement the ContainerAwareInterface |
||
37 | */ |
||
38 | use ContainerAwareMethods; |
||
39 | |||
40 | /** |
||
41 | * Creates an Object Hydrator |
||
42 | * |
||
43 | * @param InteropContainer $container |
||
44 | */ |
||
45 | public function __construct(InteropContainer $container) |
||
49 | |||
50 | /** |
||
51 | * Used internal container to inject dependencies on provided object |
||
52 | * |
||
53 | * @param mixed $object |
||
54 | * |
||
55 | * @return ObjectHydrator|ObjectHydratorInterface |
||
56 | */ |
||
57 | public function hydrate($object) |
||
66 | |||
67 | /** |
||
68 | * Evaluates method annotations and injects the dependency if needed |
||
69 | * |
||
70 | * @param string $method |
||
71 | */ |
||
72 | protected function evaluate($method) |
||
89 | } |
||
90 |