PHP Class Protocol\FCGI\Record

Mostrar archivo Open project: lisachenko/protocol-fcgi Class Usage Examples

Protected Properties

Property Type Description
$requestId integer Identifies the FastCGI request to which the record belongs.
$reserved integer Reserved byte for future proposes
$type integer Identifies the FastCGI record type, i.e. the general function that the record performs.
$version integer Identifies the FastCGI protocol version.

Public Methods

Method Description
__toString ( ) : string Returns the binary message representation of record
getContentData ( ) : string Returns the context data from the record
getContentLength ( ) : integer Returns the size of content length
getPaddingLength ( ) : integer Returns the size of padding length
getRequestId ( ) : integer
getType ( ) : integer
getVersion ( ) : integer Returns the version of record
setContentData ( $data ) Sets the content data and adjusts the length fields
setRequestId ( integer $requestId ) : Record
unpack ( string $data ) : static Unpacks the message from the binary data buffer

Protected Methods

Method Description
packPayload ( ) : string Implementation of packing the payload
unpackPayload ( Record $self, string $data ) Method to unpack the payload for the record.

Method Details

__toString() final public method

Returns the binary message representation of record
final public __toString ( ) : string
return string

getContentData() public method

Returns the context data from the record
public getContentData ( ) : string
return string

getContentLength() final public method

Returns the size of content length
final public getContentLength ( ) : integer
return integer

getPaddingLength() final public method

Returns the size of padding length
final public getPaddingLength ( ) : integer
return integer

getRequestId() public method

public getRequestId ( ) : integer
return integer

getType() public method

public getType ( ) : integer
return integer

getVersion() public method

Returns the version of record
public getVersion ( ) : integer
return integer

packPayload() protected method

Implementation of packing the payload
protected packPayload ( ) : string
return string

setContentData() public method

Sets the content data and adjusts the length fields
public setContentData ( $data )
$data

setRequestId() public method

public setRequestId ( integer $requestId ) : Record
$requestId integer
return Record

unpack() final public static method

Unpacks the message from the binary data buffer
final public static unpack ( string $data ) : static
$data string Binary buffer with raw data
return static

unpackPayload() protected static method

NB: Default implementation will be always called
protected static unpackPayload ( Record $self, string $data )
$self Record Instance of current frame
$data string Binary data

Property Details

$requestId protected_oe property

Identifies the FastCGI request to which the record belongs.
protected int $requestId
return integer

$reserved protected_oe property

Reserved byte for future proposes
protected int $reserved
return integer

$type protected_oe property

Identifies the FastCGI record type, i.e. the general function that the record performs.
protected int $type
return integer

$version protected_oe property

Identifies the FastCGI protocol version.
protected int $version
return integer