HumHub Documentation (unofficial)

Connection
in package
implements HeaderInterface

Connection Header

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

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
throws
InvalidArgumentException
Return values
static

getFieldName()

Connection header name

public getFieldName() : string
Return values
string

getFieldValue()

Connection header value

public getFieldValue() : string
Return values
string

isPersistent()

Get whether this connection is persistent

public isPersistent() : bool
Return values
bool

setPersistent()

Set Connection header to define persistent connection

public setPersistent(bool $flag) : $this
Parameters
$flag : bool
Return values
$this

setValue()

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
$this

toString()

Return header line

public toString() : string
Return values
string
Loading…
On this page

Search results