You are here

public static function Csp::isValidDirectiveName in Content-Security-Policy 8

Check if a directive name is valid.

Parameters

string $name: The directive name.

Return value

bool True if the directive name is valid.

1 call to Csp::isValidDirectiveName()
Csp::validateDirectiveName in src/Csp.php
Check if a directive name is valid, throwing an exception if not.

File

src/Csp.php, line 154

Class

Csp
A CSP Header.

Namespace

Drupal\csp

Code

public static function isValidDirectiveName($name) {
  return array_key_exists($name, static::DIRECTIVES);
}