Zend Framework  3.0
Public Attributes | Static Protected Member Functions | List of all members
AbstractSerializer Class Reference

Provides base functionality for request and response de/serialization strategies, including functionality for retrieving a line at a time from the message, splitting headers from the body, and serializing headers. More...

Public Attributes

const CR = "\r"
 
const EOL = "\r\n"
 
const LF = "\n"
 

Static Protected Member Functions

static getLine (StreamInterface $stream)
 Retrieve a single line from the stream.
 
static splitStream (StreamInterface $stream)
 Split the stream into headers and body content.
 
static serializeHeaders (array $headers)
 Serialize headers to string values.
 
static filterHeader ($header)
 Filter a header name to wordcase.
 

Detailed Description

Provides base functionality for request and response de/serialization strategies, including functionality for retrieving a line at a time from the message, splitting headers from the body, and serializing headers.

Member Function Documentation

static filterHeader (   $header)
staticprotected

Filter a header name to wordcase.

Parameters
string$header
Returns
string
static getLine ( StreamInterface  $stream)
staticprotected

Retrieve a single line from the stream.

Retrieves a line from the stream; a line is defined as a sequence of characters ending in a CRLF sequence.

Parameters
StreamInterface$stream
Returns
string
Exceptions
UnexpectedValueExceptionif the sequence contains a CR or LF in isolation, or ends in a CR.
static serializeHeaders ( array  $headers)
staticprotected

Serialize headers to string values.

Parameters
array$headers
Returns
string
static splitStream ( StreamInterface  $stream)
staticprotected

Split the stream into headers and body content.

Returns an array containing two elements

  • The first is an array of headers
  • The second is a StreamInterface containing the body content
Parameters
StreamInterface$stream
Returns
array
Exceptions
UnexpectedValueExceptionFor invalid headers.

Member Data Documentation

const CR = "\r"
const EOL = "\r\n"
const LF = "\n"