File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -211,13 +211,6 @@ public function getDefaultValueGetterName( bool $get_defined=false ): string
211211 return $ this ->default_value_getter_name ;
212212 }
213213
214- if ($ this ->context_object instanceof BaseObject) {
215- $ getter_method_name = $ this ->context_object ->objectGetterMethodName ( $ this ->getPropertyName () );
216- if (method_exists ($ this ->context_object , $ getter_method_name )) {
217- return $ getter_method_name ;
218- }
219- }
220-
221214 return '' ;
222215
223216 }
@@ -260,9 +253,14 @@ public function setSetterName( string $setter_name ): void
260253 */
261254 protected function getDefaultValue () : mixed
262255 {
256+ if (($ default_value_getter = $ this ->getDefaultValueGetterName ())) {
257+ return $ this ->context_object ->{$ default_value_getter }();
258+ }
259+
263260 $ ref = new ReflectionClass ($ this ->context_object );
264261 $ property = $ ref ->getProperty ($ this ->getPropertyName ());
265262 return $ property ->getRawValue ( $ this ->context_object );
263+
266264 }
267265
268266 /**
You can’t perform that action at this time.
0 commit comments