Connection
in package
implements
HeaderInterface
Connection Header
Tags
Table of Contents
Interfaces
- HeaderInterface
- Interface for HTTP Header classes.
Constants
- CONNECTION_CLOSE = 'close'
- CONNECTION_KEEP_ALIVE = 'keep-alive'
Properties
- $value : string
- Value of this header
Methods
- fromString() : static
- Factory to generate a header object from a string
- getFieldName() : string
- Connection header name
- getFieldValue() : string
- Connection header value
- isPersistent() : bool
- Get whether this connection is persistent
- setPersistent() : $this
- Set Connection header to define persistent connection
- setValue() : $this
- Set arbitrary header value RFC allows any token as value, 'close' and 'keep-alive' are commonly used
- toString() : string
- Return header line
Constants
CONNECTION_CLOSE
public
mixed
CONNECTION_CLOSE
= 'close'
CONNECTION_KEEP_ALIVE
public
mixed
CONNECTION_KEEP_ALIVE
= 'keep-alive'
Properties
$value
Value of this header
protected
string
$value
= self::CONNECTION_KEEP_ALIVE
Methods
fromString()
Factory to generate a header object from a string
public
static fromString(string $headerLine) : static
Parameters
- $headerLine : string
Tags
Return values
staticgetFieldName()
Connection header name
public
getFieldName() : string
Return values
stringgetFieldValue()
Connection header value
public
getFieldValue() : string
Return values
stringisPersistent()
Get whether this connection is persistent
public
isPersistent() : bool
Return values
boolsetPersistent()
Set Connection header to define persistent connection
public
setPersistent(bool $flag) : $this
Parameters
- $flag : bool
Return values
$thissetValue()
Set arbitrary header value RFC allows any token as value, 'close' and 'keep-alive' are commonly used
public
setValue(string $value) : $this
Parameters
- $value : string
Return values
$thistoString()
Return header line
public
toString() : string