HashProxy implements JsonSerializable, SourceValueInterface
FinalYes
Representation of Content-Security-Policy hash source, acting as proxy on files and URLs, to be resolved later when resource contents are actually compiled.
Table of Contents
Interfaces
- JsonSerializable
- SourceValueInterface
- Interface used for self-contained source value models.
Methods
- compile() : string|null
- Compiled representation to be used for Content-Security-Policy HTTP header.
- glob() : self
- isEmpty() : bool
- jsonSerialize() : mixed
- knows() : bool
- Determines whether a serialized representation is known and can be handled by a specific implementation, (e.g. "string starts with 'hash-proxy-").
- parse() : self
- Parses a known serialized representation as object representation.
- serialize() : string|null
- Serialized representation to be used for persisting declaration (e.g. in database).
- urls() : self
- withType() : self
Methods
compile()
Compiled representation to be used for Content-Security-Policy HTTP header.
public
compile([FrontendInterface|null $cache = null ]) : string|null
Parameters
- $cache : FrontendInterface|null = null
Return values
string|null —null
means "not applicable / skip"
glob()
public
static glob(string $glob) : self
Parameters
- $glob : string
Return values
selfisEmpty()
public
isEmpty() : bool
Return values
booljsonSerialize()
public
jsonSerialize() : mixed
knows()
Determines whether a serialized representation is known and can be handled by a specific implementation, (e.g. "string starts with 'hash-proxy-").
public
static knows(string $value) : bool
Parameters
- $value : string
Return values
boolparse()
Parses a known serialized representation as object representation.
public
static parse(string $value) : self
Parameters
- $value : string
Return values
selfserialize()
Serialized representation to be used for persisting declaration (e.g. in database).
public
serialize() : string|null
Return values
string|null —null
means "not applicable / skip"
urls()
public
static urls(string ...$urls) : self
Parameters
- $urls : string
Return values
selfwithType()
public
withType(HashType $type) : self
Parameters
- $type : HashType