Class ContentSecurityPolicy

Summary

Fully Qualified Name: Laminas\Http\Header\ContentSecurityPolicy
Implements: MultipleHeaderInterface

Description

Content Security Policy Level 3 Header

Methods

Name Description Defined By
fromString() Create Content Security Policy header from a given header line ContentSecurityPolicy
getDirectives() Get the list of defined directives ContentSecurityPolicy
getFieldName() Get the header name ContentSecurityPolicy
getFieldValue() Get the header value ContentSecurityPolicy
setDirective() Sets the directive to consist of the source list ContentSecurityPolicy
toString() Return the header as a string ContentSecurityPolicy
toStringMultipleHeaders() ContentSecurityPolicy

Method Details

fromString()

Create Content Security Policy header from a given header line

Parameter Name Type Description
$headerLine string The

Returns: static

getDirectives()

Get the list of defined directives

Returns: array

getFieldName()

Get the header name

Returns: string

getFieldValue()

Get the header value

Returns: string

setDirective()

Sets the directive to consist of the source list

Reverses http://www.w3.org/TR/CSP/#parsing-1

Parameter Name Type Description
$name string The
$sources array The

Returns: $this

toString()

Return the header as a string

Returns: string

toStringMultipleHeaders()

Parameter Name Type Description
$headers

Returns: void

Top