Connection Header

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

 Methods

Factory to generate a header object from a string

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

Parameters

$headerLine

Exceptions

\Zend\Http\Header\Exception\InvalidArgumentException

Returns

\Zend\Http\Header\Connection

Connection header name

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

Returns

string

Connection header value

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

Returns

string

Get whether this connection is persistent

isPersistent() : boolean

Returns

boolean

Set Connection header to define persistent connection

setPersistent(boolean $flag) : \Zend\Http\Header\Connection

Parameters

$flag

boolean

Returns

\Zend\Http\Header\Connection

Set arbitrary header value RFC allows any token as value, 'close' and 'keep-alive' are commonly used

setValue(string $value) : \Zend\Http\Header\Connection

Parameters

$value

string

Returns

\Zend\Http\Header\Connection

Return header line

toString() : string

Returns in form of "NAME: VALUE"

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

Returns

string

 Properties

 

Value of this header

$value : string

Default

self::CONNECTION_KEEP_ALIVE

 Constants

 

CONNECTION_CLOSE

CONNECTION_CLOSE = 'close' 
 

CONNECTION_KEEP_ALIVE

CONNECTION_KEEP_ALIVE = 'keep-alive'