1 | <?php |
||
21 | abstract class AbstractObject implements ObjectInterface |
||
22 | { |
||
23 | /** |
||
24 | * Constructor |
||
25 | * |
||
26 | * @param array $config |
||
27 | */ |
||
28 | public function __construct($config = []) |
||
35 | |||
36 | /** |
||
37 | * @inheritdoc |
||
38 | */ |
||
39 | public static function create($config = []): ObjectInterface |
||
51 | |||
52 | /** |
||
53 | * @inheritdoc |
||
54 | */ |
||
55 | public function init() |
||
58 | |||
59 | /** |
||
60 | * @inheritdoc |
||
61 | */ |
||
62 | public function hasProperty($name, $checkVars = true): bool |
||
66 | |||
67 | /** |
||
68 | * @inheritdoc |
||
69 | */ |
||
70 | public function canGetProperty($name, $checkVars = true): bool |
||
74 | |||
75 | /** |
||
76 | * @inheritdoc |
||
77 | */ |
||
78 | public function canSetProperty($name, $checkVars = true): bool |
||
82 | |||
83 | /** |
||
84 | * @inheritdoc |
||
85 | */ |
||
86 | public function hasMethod($name): bool |
||
90 | |||
91 | /** |
||
92 | * Returns the value of an object property. |
||
93 | * |
||
94 | * @param $name |
||
95 | * @return mixed |
||
96 | * @throws InvalidCallException |
||
97 | * @throws UnknownPropertyException |
||
98 | */ |
||
99 | public function __get($name) |
||
110 | |||
111 | /** |
||
112 | * Sets value of an object property. |
||
113 | * |
||
114 | * @param $name |
||
115 | * @param $value |
||
116 | * @throws InvalidCallException |
||
117 | * @throws UnknownPropertyException |
||
118 | */ |
||
119 | public function __set($name, $value) |
||
130 | |||
131 | /** |
||
132 | * Checks if a property is set, i.e. defined and not null. |
||
133 | * |
||
134 | * @param $name |
||
135 | * @return bool |
||
136 | */ |
||
137 | public function __isset($name) |
||
146 | |||
147 | /** |
||
148 | * Sets an object property to null. |
||
149 | * |
||
150 | * @param $name |
||
151 | * @throws InvalidCallException |
||
152 | */ |
||
153 | public function __unset($name) |
||
162 | |||
163 | /** |
||
164 | * Calls the named method which is not a class method. |
||
165 | * |
||
166 | * @param $name |
||
167 | * @param $params |
||
168 | * @throws UnknownMethodException |
||
169 | */ |
||
170 | public function __call($name, $params) |
||
174 | } |
||
175 |