You are here

public function Twig_Extension_Sandbox::ensureToStringAllowed in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Extension/Sandbox.php \Twig_Extension_Sandbox::ensureToStringAllowed()

File

vendor/twig/twig/lib/Twig/Extension/Sandbox.php, line 84

Class

Twig_Extension_Sandbox

Code

public function ensureToStringAllowed($obj) {
  if ($this
    ->isSandboxed() && is_object($obj)) {
    $this->policy
      ->checkMethodAllowed($obj, '__toString');
  }
  return $obj;
}