Returns the attribute value for a given array/object.
mixed $object The object or array from where to get the item:
mixed $item The item to get from the array or object:
array $arguments An array of arguments to pass if the item is an object method:
string $type The type of attribute (@see Twig_TemplateInterface):
Boolean $isDefinedTest Whether this is only a defined check:
Boolean $ignoreStrictCheck Whether to ignore the strict attribute check or not:
mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true
Twig_Error_Runtime if the attribute does not exist and Twig is running in strict mode and $isDefinedTest is false
Overrides Twig_Template::getAttribute
public function getAttribute($object, $item, array $arguments = array(), $type = Twig_TemplateInterface::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false) {
if ($this->useExtGetAttribute) {
return twig_template_get_attributes($this, $object, $item, $arguments, $type, $isDefinedTest, $ignoreStrictCheck);
}
else {
return parent::getAttribute($object, $item, $arguments, $type, $isDefinedTest, $ignoreStrictCheck);
}
}