You are here

public function Twig_Sandbox_SecurityPolicy::setAllowedMethods in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php \Twig_Sandbox_SecurityPolicy::setAllowedMethods()
1 call to Twig_Sandbox_SecurityPolicy::setAllowedMethods()
Twig_Sandbox_SecurityPolicy::__construct in vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php

File

vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php, line 44

Class

Twig_Sandbox_SecurityPolicy
Represents a security policy which need to be enforced when sandbox mode is enabled.

Code

public function setAllowedMethods(array $methods) {
  $this->allowedMethods = array();
  foreach ($methods as $class => $m) {
    $this->allowedMethods[$class] = array_map('strtolower', is_array($m) ? $m : array(
      $m,
    ));
  }
}