Class GenericHeader

Summary

Fully Qualified Name: Laminas\Http\Header\GenericHeader
Implements: HeaderInterface

Description

Content-Location Header

Methods

Name Description Defined By
__construct() Constructor GenericHeader
fromString() Factory to generate a header object from a string GenericHeader
getFieldName() Retrieve header field name GenericHeader
getFieldValue() Retrieve header field value GenericHeader
setFieldName() Set header field name GenericHeader
setFieldValue() Set header field value GenericHeader
splitHeaderLine() Splits the header line in `name` and `value` parts. GenericHeader
toString() Cast to string as a well formed HTTP header line GenericHeader

Method Details

__construct()

Constructor

Parameter Name Type Description
$fieldName null|string
$fieldValue null|string

Returns:

fromString()

Factory to generate a header object from a string

Parameter Name Type Description
$headerLine string

Returns: static

getFieldName()

Retrieve header field name

Returns: string

getFieldValue()

Retrieve header field value

Returns: string

setFieldName()

Set header field name

Parameter Name Type Description
$fieldName string

Returns: $this

setFieldValue()

Set header field value

Parameter Name Type Description
$fieldValue string

Returns: $this

splitHeaderLine()

Splits the header line in `name` and `value` parts.

Parameter Name Type Description
$headerLine string

Returns: string[] `name` in the first index and `value` in the second.

toString()

Cast to string as a well formed HTTP header line

Returns in form of "NAME: VALUE\r\n"

Returns: string

Top