You are here

public function Csp::getDirective in Content-Security-Policy 8

Get the value of a directive.

Parameters

string $name: The directive name.

Return value

array The directive's values.

1 call to Csp::getDirective()
Csp::fallbackAwareAppendIfEnabled in src/Csp.php
Append to a directive if it or a fallback directive is enabled.

File

src/Csp.php, line 258

Class

Csp
A CSP Header.

Namespace

Drupal\csp

Code

public function getDirective($name) {
  self::validateDirectiveName($name);
  return $this->directives[$name];
}