Allow Header

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

 Methods

Allow methods or list of methods

allowMethods(array|string $allowedMethods) : \Zend\Http\Header\Allow

Parameters

$allowedMethods

arraystring

Returns

\Zend\Http\Header\Allow

Convenience alias for @see disallowMethods()

denyMethods(array|string $disallowedMethods) : \Zend\Http\Header\Allow

Parameters

$disallowedMethods

arraystring

Returns

\Zend\Http\Header\Allow

Disallow methods or list of methods

disallowMethods(array|string $disallowedMethods) : \Zend\Http\Header\Allow

Parameters

$disallowedMethods

arraystring

Returns

\Zend\Http\Header\Allow

Create Allow header from header line

fromString(string $headerLine) : \Zend\Http\Header\Allow
Static
inherited_from \Zend\Http\Header\HeaderInterface::fromString()

Parameters

$headerLine

string

Exceptions

\Zend\Http\Header\Exception\InvalidArgumentException

Returns

\Zend\Http\Header\Allow

Get list of all defined methods

getAllMethods() : array

Returns

array

Get list of allowed methods

getAllowedMethods() : array

Returns

array

Get header name

getFieldName() : string
inherited_from \Zend\Http\Header\HeaderInterface::getFieldName()

Returns

string

Get comma-separated list of allowed methods

getFieldValue() : string
inherited_from \Zend\Http\Header\HeaderInterface::getFieldValue()

Returns

string

Check whether method is allowed

isAllowedMethod(string $method) : boolean

Parameters

$method

string

Returns

boolean

Return header as string

toString() : string

Returns in form of "NAME: VALUE"

inherited_from \Zend\Http\Header\HeaderInterface::toString()

Returns

string

 Properties

 

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

$methods : array

Default

array(\Zend\Http\Request::METHOD_OPTIONS => false, \Zend\Http\Request::METHOD_GET => true, \Zend\Http\Request::METHOD_HEAD => false, \Zend\Http\Request::METHOD_POST => true, \Zend\Http\Request::METHOD_PUT => false, \Zend\Http\Request::METHOD_DELETE => false, \Zend\Http\Request::METHOD_TRACE => false, \Zend\Http\Request::METHOD_CONNECT => false, \Zend\Http\Request::METHOD_PATCH => false)