Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SecurityPolicy.php

function SecurityPolicy::setAllowedMethods

1 call to SecurityPolicy::setAllowedMethods()
SecurityPolicy::__construct in vendor/twig/twig/src/Sandbox/SecurityPolicy.php

File

vendor/twig/twig/src/Sandbox/SecurityPolicy.php, line 49

Class

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

Namespace

Twig\Sandbox

Code

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