HumHub Documentation (unofficial)

Allow
in package
implements HeaderInterface

Allow Header

Tags
link
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.7

Table of Contents

Interfaces

HeaderInterface
Interface for HTTP Header classes.

Properties

$methods  : array<string|int, mixed>
List of request methods true states that method is allowed, false - disallowed By default GET and POST are allowed

Methods

allowMethods()  : $this
Allow methods or list of methods
denyMethods()  : $this
Convenience alias for @see disallowMethods()
disallowMethods()  : $this
Disallow methods or list of methods
fromString()  : static
Create Allow header from header line
getAllMethods()  : array<string|int, mixed>
Get list of all defined methods
getAllowedMethods()  : array<string|int, mixed>
Get list of allowed methods
getFieldName()  : string
Get header name
getFieldValue()  : string
Get comma-separated list of allowed methods
isAllowedMethod()  : bool
Check whether method is allowed
toString()  : string
Return header as string

Properties

$methods

List of request methods true states that method is allowed, false - disallowed By default GET and POST are allowed

protected array<string|int, mixed> $methods = [\Laminas\Http\Request::METHOD_OPTIONS => false, \Laminas\Http\Request::METHOD_GET => true, \Laminas\Http\Request::METHOD_HEAD => false, \Laminas\Http\Request::METHOD_POST => true, \Laminas\Http\Request::METHOD_PUT => false, \Laminas\Http\Request::METHOD_DELETE => false, \Laminas\Http\Request::METHOD_TRACE => false, \Laminas\Http\Request::METHOD_CONNECT => false, \Laminas\Http\Request::METHOD_PATCH => false]

Methods

allowMethods()

Allow methods or list of methods

public allowMethods(array<string|int, mixed>|string $allowedMethods) : $this
Parameters
$allowedMethods : array<string|int, mixed>|string
Return values
$this

denyMethods()

Convenience alias for @see disallowMethods()

public denyMethods(array<string|int, mixed>|string $disallowedMethods) : $this
Parameters
$disallowedMethods : array<string|int, mixed>|string
Return values
$this

disallowMethods()

Disallow methods or list of methods

public disallowMethods(array<string|int, mixed>|string $disallowedMethods) : $this
Parameters
$disallowedMethods : array<string|int, mixed>|string
Return values
$this

fromString()

Create Allow header from header line

public static fromString(string $headerLine) : static
Parameters
$headerLine : string
Tags
throws
InvalidArgumentException
Return values
static

getAllMethods()

Get list of all defined methods

public getAllMethods() : array<string|int, mixed>
Return values
array<string|int, mixed>

getAllowedMethods()

Get list of allowed methods

public getAllowedMethods() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFieldName()

Get header name

public getFieldName() : string
Return values
string

getFieldValue()

Get comma-separated list of allowed methods

public getFieldValue() : string
Return values
string

isAllowedMethod()

Check whether method is allowed

public isAllowedMethod(string $method) : bool
Parameters
$method : string
Return values
bool

toString()

Return header as string

public toString() : string
Return values
string

        
On this page

Search results