‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Security\ContentSecurityPolicy\SourceValueInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Core\Security\ContentSecurityPolicy\SourceValueInterface:
TYPO3\CMS\Core\Security\ContentSecurityPolicy\SourceInterface TYPO3\CMS\Core\Security\ContentSecurityPolicy\HashProxy TYPO3\CMS\Core\Security\ContentSecurityPolicy\HashValue

Public Member Functions

string compile (?FrontendInterface $cache=null)
 
string serialize ()
 

Static Public Member Functions

static knows (string $value)
 
static parse (string $value)
 

Detailed Description

Interface used for self-contained source value models. The parent SourceInterface is basically just a type interface, since type cannot be declared better in PHP. This SourceValueInterface is focussed on real class instances, but not on enum objects.

This implementation might still change

Definition at line 30 of file SourceValueInterface.php.

Member Function Documentation

◆ compile()

string TYPO3\CMS\Core\Security\ContentSecurityPolicy\SourceValueInterface::compile ( ?FrontendInterface  $cache = null)

Compiled representation to be used for Content-Security-Policy HTTP header.

Returns
‪?string null means "not applicable / skip"

Implemented in TYPO3\CMS\Core\Security\ContentSecurityPolicy\HashProxy, and TYPO3\CMS\Core\Security\ContentSecurityPolicy\HashValue.

◆ knows()

static TYPO3\CMS\Core\Security\ContentSecurityPolicy\SourceValueInterface::knows ( string  $value)
static

Determines whether a serialized representation is known and can be handled by a specific implementation, (e.g. "string starts with 'hash-proxy-").

Implemented in TYPO3\CMS\Core\Security\ContentSecurityPolicy\HashProxy, and TYPO3\CMS\Core\Security\ContentSecurityPolicy\HashValue.

◆ parse()

static TYPO3\CMS\Core\Security\ContentSecurityPolicy\SourceValueInterface::parse ( string  $value)
static

Parses a known serialized representation as object representation.

Implemented in TYPO3\CMS\Core\Security\ContentSecurityPolicy\HashProxy, and TYPO3\CMS\Core\Security\ContentSecurityPolicy\HashValue.

◆ serialize()

string TYPO3\CMS\Core\Security\ContentSecurityPolicy\SourceValueInterface::serialize ( )

Serialized representation to be used for persisting declaration (e.g. in database).

Returns
‪?string null means "not applicable / skip"

Implemented in TYPO3\CMS\Core\Security\ContentSecurityPolicy\HashProxy, and TYPO3\CMS\Core\Security\ContentSecurityPolicy\HashValue.