Overrides Twig_Sandbox_SecurityPolicyInterface::checkPropertyAllowed
public function checkPropertyAllowed($obj, $property) {
$allowed = false;
foreach ($this->allowedProperties as $class => $properties) {
if ($obj instanceof $class) {
$allowed = in_array($property, is_array($properties) ? $properties : array(
$properties,
));
break;
}
}
if (!$allowed) {
throw new Twig_Sandbox_SecurityError(sprintf('Calling "%s" property on a "%s" object is not allowed.', $property, get_class($obj)));
}
}