1 | <?php |
||
10 | class ConcreteType implements TypeInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var TypeInterface |
||
14 | */ |
||
15 | private static $instance; |
||
16 | |||
17 | public static function getType() |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | private $namespaceLookup = []; |
||
30 | |||
31 | /** |
||
32 | * Set of user defined namespaces to lookup for class autoloading. |
||
33 | * |
||
34 | * @param array $namespaces |
||
35 | */ |
||
36 | public function setNamespaces(array $namespaces) |
||
40 | |||
41 | /** |
||
42 | * @param string $class |
||
43 | * |
||
44 | * @return string |
||
45 | * |
||
46 | * @throws ParserException |
||
47 | */ |
||
48 | protected function checkClassExistence($class) |
||
66 | |||
67 | /** |
||
68 | * Process a value to be a concrete annotation |
||
69 | * |
||
70 | * @param string $value json string |
||
71 | * @param string $class name of concrete annotation type (class) |
||
72 | * |
||
73 | * @throws ParserException |
||
74 | * |
||
75 | * @return object |
||
76 | */ |
||
77 | public function parse($value, $class = null) |
||
97 | |||
98 | protected function makeConstructSugarInjectionInstance($class, array $prototype) { |
||
104 | |||
105 | /** |
||
106 | * Creates and hydrates a concrete annotation class |
||
107 | * |
||
108 | * @param string $class full qualified class name |
||
109 | * @param stdClass $prototype object prototype |
||
110 | * @return object hydrated concrete annotation class |
||
111 | */ |
||
112 | protected function makeInstance($class, stdClass $prototype) |
||
124 | |||
125 | /** |
||
126 | * Do configuration injection through method calls |
||
127 | * |
||
128 | * @param object $instance concrete annotation instance |
||
129 | * @param stdClass $prototype object prototype |
||
130 | * @return object hydrated concrete annotation class |
||
131 | */ |
||
132 | protected function doMethodConfiguration($instance, stdClass $prototype) |
||
140 | |||
141 | /** |
||
142 | * Validates a prototype object |
||
143 | * |
||
144 | * @param stdClass $prototype object prototype |
||
145 | * @return boolean true if prototype is valid |
||
146 | */ |
||
147 | protected function isPrototypeSchemaValid(stdclass $prototype) |
||
157 | |||
158 | } |
||
159 |