1 | <?php |
||
17 | class ReflectionObject |
||
18 | { |
||
19 | private $object; |
||
20 | private $properties; |
||
21 | private $injectionStrategies; |
||
22 | |||
23 | 6 | public function __construct( |
|
56 | |||
57 | /** |
||
58 | * Add a property that will be injected |
||
59 | * |
||
60 | * @param string $name |
||
61 | * @param mixed $value |
||
62 | * |
||
63 | * @return self |
||
64 | */ |
||
65 | 4 | public function withProperty(string $name, $value) |
|
73 | |||
74 | /** |
||
75 | * Return the collection of properties that will be injected in the object |
||
76 | * |
||
77 | * @return CollectionInterface |
||
78 | */ |
||
79 | 2 | public function getProperties(): CollectionInterface |
|
83 | |||
84 | /** |
||
85 | * Return the object with the list of properties set on it |
||
86 | * |
||
87 | * @return object |
||
88 | */ |
||
89 | 4 | public function buildObject() |
|
97 | |||
98 | /** |
||
99 | * Inject the given key/value pair into the object |
||
100 | * |
||
101 | * @param string $key |
||
102 | * @param mixed $value |
||
103 | * |
||
104 | * @return void |
||
105 | */ |
||
106 | 3 | private function inject(string $key, $value) |
|
121 | } |
||
122 |