1 | <?php |
||
7 | class AutoConstructReader extends Reader |
||
8 | { |
||
9 | /** |
||
10 | * The name of the annotation class that define the construct arguments. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | private static $constructAnnotationClass = "Accessible\\Annotation\\Construct"; |
||
15 | |||
16 | /** |
||
17 | * The name of the annotation class that define a property's default value. |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | private static $initializeAnnotationClass = "Accessible\\Annotation\\Initialize"; |
||
22 | |||
23 | /** |
||
24 | * The name of the annotation class that define the initial value of an object property. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | private static $initializeObjectAnnotationClass = "Accessible\\Annotation\\InitializeObject"; |
||
29 | |||
30 | /** |
||
31 | * Get the list of needed arguments for given object's constructor. |
||
32 | * |
||
33 | * @param object $object The object to analyze. |
||
34 | * |
||
35 | * @return array The list of arguments. |
||
36 | */ |
||
37 | 29 | public static function getConstructArguments($object) |
|
63 | |||
64 | /** |
||
65 | * Get the list of properties that have to be initialized automatically |
||
66 | * during the object construction, plus their value. |
||
67 | * |
||
68 | * @param object $object The object to analyze. |
||
69 | * |
||
70 | * @return array The list of properties and values, |
||
71 | * in the form ["property" => "value"]. |
||
72 | */ |
||
73 | 29 | public static function getPropertiesToInitialize($object) |
|
113 | } |
||
114 |