Lines Matching refs:object

490      * @param mixed  $object            The object or array from where to get the item
503 …protected function getAttribute($object, $item, array $arguments = [], $type = self::ANY_CALL, $is… argument
509 …if (((\is_array($object) || $object instanceof \ArrayObject) && (isset($object[$arrayItem]) || \ar…
510 || ($object instanceof \ArrayAccess && isset($object[$arrayItem]))
516 return $object[$arrayItem];
519 if (self::ARRAY_CALL === $type || !\is_object($object)) {
528 if ($object instanceof \ArrayAccess) {
529 …y "%s" in object with ArrayAccess of class "%s" does not exist.', $arrayItem, \get_class($object));
530 } elseif (\is_object($object)) {
531 … object of class "%s" that does not implement ArrayAccess interface.', $item, \get_class($object));
532 } elseif (\is_array($object)) {
533 if (empty($object)) {
536 …ey "%s" for array with keys "%s" does not exist.', $arrayItem, implode(', ', array_keys($object)));
539 if (null === $object) {
542 …f('Impossible to access a key ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
544 } elseif (null === $object) {
547 …ssible to access an attribute ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
554 if (!\is_object($object)) {
563 if (null === $object) {
565 } elseif (\is_array($object)) {
568 …Impossible to invoke a method ("%s") on a %s variable ("%s").', $item, \gettype($object), $object);
575 …if (self::METHOD_CALL !== $type && !$object instanceof self) { // \Twig\Template does not have pub…
576 if (isset($object->$item) || \array_key_exists((string) $item, $object)) {
582 …$this->env->getExtension('\Twig\Extension\SandboxExtension')->checkPropertyAllowed($object, $item);
585 return $object->$item;
589 $class = \get_class($object);
594 if ($object instanceof self) {
605 $methods = get_class_methods($object);
664 …$this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object, $method);
671 $ret = $object->$method();
673 $ret = \call_user_func_array([$object, $method], $arguments);
683 if ($object instanceof \Twig_TemplateInterface) {
684 $self = $object->getTemplateName() === $this->getTemplateName();
685 …ted since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName()…
691 $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName());