1 | <?php |
||
21 | class Object extends Base implements ObjectResolver |
||
22 | { |
||
23 | /** |
||
24 | * @readwrite |
||
25 | * @var ObjectDefinitionInterface |
||
26 | */ |
||
27 | protected $definition; |
||
28 | |||
29 | /** |
||
30 | * Resolves provided definition |
||
31 | * |
||
32 | * @return mixed |
||
33 | */ |
||
34 | 58 | public function resolve() |
|
40 | |||
41 | /** |
||
42 | * Set the definition that this resolver will resolve |
||
43 | * |
||
44 | * @param ObjectDefinitionInterface $definition Definition to resolve |
||
45 | * |
||
46 | * @return $this|self |
||
47 | */ |
||
48 | 58 | public function setDefinition($definition) |
|
53 | |||
54 | /** |
||
55 | * Call definition methods with parameters |
||
56 | * |
||
57 | * @return $this|self |
||
58 | */ |
||
59 | 58 | private function setMethods() |
|
70 | |||
71 | /** |
||
72 | * Sets property values |
||
73 | * |
||
74 | * @return $this|self |
||
75 | */ |
||
76 | 58 | private function setProperties() |
|
83 | |||
84 | /** |
||
85 | * Set a value to provided property |
||
86 | * |
||
87 | * @param string $name Property name |
||
88 | * @param mixed $value Property value |
||
89 | */ |
||
90 | 14 | private function setProperty($name, $value) |
|
101 | |||
102 | /** |
||
103 | * Check values to resolve dependencies |
||
104 | * |
||
105 | * @param array $params |
||
106 | * |
||
107 | * @return array |
||
108 | */ |
||
109 | 14 | public function checkValues(array $params) |
|
117 | |||
118 | /** |
||
119 | * Check if value is a container entry and change it |
||
120 | * |
||
121 | * @param mixed $param |
||
122 | * |
||
123 | * @return mixed |
||
124 | */ |
||
125 | 20 | private function checkValue($param) |
|
137 | } |
||
138 |