You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewInvalidPropertyException(sprintf('Index "%s" cannot be read from object of type "%s" because it doesn\'t implement \ArrayAccess', $propertyPath->getCurrent(), get_class($object)));
if (!$reflClass->getMethod($getter)->isPublic()) {
522
-
thrownewPropertyAccessDeniedException(sprintf('Method "%s()" is not public in class "%s"', $getter, $reflClass->getName()));
523
-
}
524
-
525
-
return$object->$getter();
526
-
} elseif ($reflClass->hasMethod($isser)) {
527
-
if (!$reflClass->getMethod($isser)->isPublic()) {
528
-
thrownewPropertyAccessDeniedException(sprintf('Method "%s()" is not public in class "%s"', $isser, $reflClass->getName()));
529
-
}
530
-
531
-
return$object->$isser();
532
-
} elseif ($reflClass->hasProperty($property)) {
533
-
if (!$reflClass->getProperty($property)->isPublic()) {
534
-
thrownewPropertyAccessDeniedException(sprintf('Property "%s" is not public in class "%s". Maybe you should create the method "get%s()" or "is%s()"?', $property, $reflClass->getName(), ucfirst($property), ucfirst($property)));
535
-
}
536
-
537
-
return$object->$property;
538
-
} elseif (property_exists($object, $property)) {
539
-
// needed to support \stdClass instances
540
-
return$object->$property;
541
-
} else {
542
-
thrownewInvalidPropertyException(sprintf('Neither property "%s" nor method "%s()" nor method "%s()" exists in class "%s"', $property, $getter, $isser, $reflClass->getName()));
if (is_object($objectOrArray) && $propertyPath->isIndex()) {
550
-
if (!$objectOrArrayinstanceof \ArrayAccess) {
551
-
thrownewInvalidPropertyException(sprintf('Index "%s" cannot be modified in object of type "%s" because it doesn\'t implement \ArrayAccess', $propertyPath->getCurrent(), get_class($objectOrArray)));
if (!$reflClass->getMethod($setter)->isPublic()) {
562
-
thrownewPropertyAccessDeniedException(sprintf('Method "%s()" is not public in class "%s"', $setter, $reflClass->getName()));
563
-
}
564
-
565
-
$objectOrArray->$setter($this->getData());
566
-
} elseif ($reflClass->hasProperty($property)) {
567
-
if (!$reflClass->getProperty($property)->isPublic()) {
568
-
thrownewPropertyAccessDeniedException(sprintf('Property "%s" is not public in class "%s". Maybe you should create the method "set%s()"?', $property, $reflClass->getName(), ucfirst($property)));
0 commit comments