ModelService
Helpers for working with Content-Security-Policy models.
Table of Contents
Methods
- __construct() : mixed
- buildMutationCollectionFromArray() : MutationCollection
- buildMutationFromArray() : Mutation
- buildMutationSuggestionFromArray() : MutationSuggestion
- buildSourceFromString() : SourceInterface|null
- buildSourcesFromItems() : array<string|int, mixed>
- compileSources() : array<string|int, mixed>
- serializeSource() : string
- serializeSources() : array<string|int, mixed>
Methods
__construct()
public
__construct([FrontendInterface|null $cache = null ]) : mixed
Parameters
- $cache : FrontendInterface|null = null
-
to be used for storing compiled CSP aspects (disabled in install tool)
buildMutationCollectionFromArray()
public
buildMutationCollectionFromArray(array<string|int, mixed> $array) : MutationCollection
Parameters
- $array : array<string|int, mixed>
Return values
MutationCollectionbuildMutationFromArray()
public
buildMutationFromArray(array<string|int, mixed> $array) : Mutation
Parameters
- $array : array<string|int, mixed>
Return values
MutationbuildMutationSuggestionFromArray()
public
buildMutationSuggestionFromArray(array<string|int, mixed> $array) : MutationSuggestion
Parameters
- $array : array<string|int, mixed>
Return values
MutationSuggestionbuildSourceFromString()
public
buildSourceFromString(string $string) : SourceInterface|null
Parameters
- $string : string
Return values
SourceInterface|nullbuildSourcesFromItems()
public
buildSourcesFromItems(string ...$items) : array<string|int, mixed>
Parameters
- $items : string
Return values
array<string|int, mixed>compileSources()
public
compileSources(ConsumableNonce $nonce, SourceCollection $collection) : array<string|int, mixed>
Parameters
- $nonce : ConsumableNonce
- $collection : SourceCollection
Return values
array<string|int, mixed>serializeSource()
public
serializeSource(SourceInterface $source[, ConsumableNonce|null $nonce = null ]) : string
Parameters
- $source : SourceInterface
- $nonce : ConsumableNonce|null = null
-
used to substitute
SourceKeyword::nonceProxy
items during compilation
Return values
stringserializeSources()
public
serializeSources(SourceInterface ...$sources) : array<string|int, mixed>
Parameters
- $sources : SourceInterface