CSPBackendTrait
Trait CSPBackendTrait contains all variables, static and dynamic, and their respective getters and setters This is to keep the CSPBackend class itself more readable
Table of Contents
Properties
- $cssBuilder : CSSBuilder
- $cssSRI : bool
- CSS defaults to false.
- $headCSS : array<string|int, mixed>
- CSS to be inserted in to the head
- $headJS : array<string|int, mixed>
- JS to be inserted in to the head
- $jsBuilder : JSBuilder
- $jsSRI : bool
- $useNonce : bool
Methods
- getCssBuilder() : CSSBuilder
- getHeadCSS() : array<string|int, mixed>
- getHeadJS() : array<string|int, mixed>
- getJsBuilder() : JSBuilder
- isCssSRI() : bool
- isJsSRI() : bool
- isUsesNonce() : bool
- setCssBuilder() : void
- setCssSRI() : void
- setHeadCSS() : void
- setHeadJS() : void
- setJsBuilder() : void
- setJsSRI() : void
- setUsesNonce() : void
Properties
$cssBuilder
protected
CSSBuilder
$cssBuilder
$cssSRI
CSS defaults to false.
protected
static bool
$cssSRI
It's causing a lot of trouble with CDN's usually
$headCSS
CSS to be inserted in to the head
protected
static array<string|int, mixed>
$headCSS
= []
$headJS
JS to be inserted in to the head
protected
static array<string|int, mixed>
$headJS
= []
$jsBuilder
protected
JSBuilder
$jsBuilder
$jsSRI
protected
static bool
$jsSRI
$useNonce
protected
static bool
$useNonce
= false
Methods
getCssBuilder()
public
getCssBuilder() : CSSBuilder
Return values
CSSBuildergetHeadCSS()
public
static getHeadCSS() : array<string|int, mixed>
Return values
array<string|int, mixed>getHeadJS()
public
static getHeadJS() : array<string|int, mixed>
Return values
array<string|int, mixed>getJsBuilder()
public
getJsBuilder() : JSBuilder
Return values
JSBuilderisCssSRI()
public
static isCssSRI() : bool
Return values
boolisJsSRI()
public
static isJsSRI() : bool
Return values
boolisUsesNonce()
public
static isUsesNonce() : bool
Return values
boolsetCssBuilder()
public
setCssBuilder(CSSBuilder $cssBuilder) : void
Parameters
- $cssBuilder : CSSBuilder
setCssSRI()
public
static setCssSRI(bool $cssSRI) : void
Parameters
- $cssSRI : bool
setHeadCSS()
public
static setHeadCSS(array<string|int, mixed> $headCSS) : void
Parameters
- $headCSS : array<string|int, mixed>
setHeadJS()
public
static setHeadJS(array<string|int, mixed> $headJS) : void
Parameters
- $headJS : array<string|int, mixed>
setJsBuilder()
public
setJsBuilder(JSBuilder $jsBuilder) : void
Parameters
- $jsBuilder : JSBuilder
setJsSRI()
public
static setJsSRI(bool $jsSRI) : void
Parameters
- $jsSRI : bool
setUsesNonce()
public
static setUsesNonce(bool $useNonce) : void
Parameters
- $useNonce : bool
-
static::isUseNonce()