‪TYPO3CMS  ‪main
TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ContentSecurityPolicyDirective Class Reference

Public Member Functions

 __construct (string $name, string $rule)
 
 getName ()
 
string[] getInstructions ()
 
string[] getSources ()
 
 hasInstructions (string ... $instructions)
 

Protected Attributes

const RULE_PATTERN = '#(?:\'(?<instruction>[^\']+)\')|(?<source>[^\s]+)#'
 
string $name
 
string[] $instructions = array( )
 
string[] $sources = array( )
 

Detailed Description

Evaluates a Content-Security-Policy HTTP header.

should only be used from within TYPO3 Core

Definition at line 25 of file ContentSecurityPolicyDirective.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ContentSecurityPolicyDirective::__construct ( string  $name,
string  $rule 
)

Member Function Documentation

◆ getInstructions()

string [] TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ContentSecurityPolicyDirective::getInstructions ( )

◆ getName()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ContentSecurityPolicyDirective::getName ( )

◆ getSources()

string [] TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ContentSecurityPolicyDirective::getSources ( )

◆ hasInstructions()

TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ContentSecurityPolicyDirective::hasInstructions ( string ...  $instructions)

Member Data Documentation

◆ $instructions

string [] TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ContentSecurityPolicyDirective::$instructions = array( )
protected

◆ $name

string TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ContentSecurityPolicyDirective::$name
protected

◆ $sources

string [] TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ContentSecurityPolicyDirective::$sources = array( )
protected

◆ RULE_PATTERN

const TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ContentSecurityPolicyDirective::RULE_PATTERN = '#(?:\'(?<instruction>[^\']+)\')|(?<source>[^\s]+)#'
protected

Definition at line 27 of file ContentSecurityPolicyDirective.php.