Allow
in package
implements
HeaderInterface
Allow Header
Tags
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
$thisdenyMethods()
Convenience alias for @see disallowMethods()
public
denyMethods(array<string|int, mixed>|string $disallowedMethods) : $this
Parameters
- $disallowedMethods : array<string|int, mixed>|string
Return values
$thisdisallowMethods()
Disallow methods or list of methods
public
disallowMethods(array<string|int, mixed>|string $disallowedMethods) : $this
Parameters
- $disallowedMethods : array<string|int, mixed>|string
Return values
$thisfromString()
Create Allow header from header line
public
static fromString(string $headerLine) : static
Parameters
- $headerLine : string
Tags
Return values
staticgetAllMethods()
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
stringgetFieldValue()
Get comma-separated list of allowed methods
public
getFieldValue() : string
Return values
stringisAllowedMethod()
Check whether method is allowed
public
isAllowedMethod(string $method) : bool
Parameters
- $method : string
Return values
booltoString()
Return header as string
public
toString() : string