This class represents a Stomp Frame

category Zend
package Zend_Queue
subpackage Stomp
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Constructor

__construct() 

__toString()

__toString() : string
see
inherited_from \Zend_Queue_Stomp_FrameInterface::__toString()

Returns

string

Accepts a frame and deconstructs the frame into its component parts

fromFrame(string $frame) : \Zend_Queue_Stomp_Frame
inherited_from \Zend_Queue_Stomp_FrameInterface::fromFrame()
fluent This method is part of a fluent interface and will return the same instance

Parameters

$frame

string
  • a stomp frame

Returns

\Zend_Queue_Stomp_Frame

get the status of the auto content length

getAutoContentLength() : boolean

If AutoContentLength is true this code will automatically put the content-length header in, even if it is already set by the user.

This is done to make the message sending more reliable.

inherited_from \Zend_Queue_Stomp_FrameInterface::getAutoContentLength()

Returns

boolean

Return the body for this frame

getBody() : false | string

Returns false if the body does not exist

inherited_from \Zend_Queue_Stomp_FrameInterface::getBody()

Returns

falsestring

Return the command for this frame

getCommand() : string | false

Return false if the command does not exist

inherited_from \Zend_Queue_Stomp_FrameInterface::getCommand()

Returns

stringfalse

Returns a value for a header

getHeader(string $header) : string | false

Returns false if the header does not exist.

inherited_from \Zend_Queue_Stomp_FrameInterface::getHeader()

Parameters

$header

string

Exceptions

\Zend_Queue_Exception

Returns

stringfalse

Get the headers

getHeaders() : array
inherited_from \Zend_Queue_Stomp_FrameInterface::getHeaders()

Returns

array

setAutoContentLength()

setAutoContentLength(boolean $auto) : \$this;

Set the value on or off.

inherited_from \Zend_Queue_Stomp_FrameInterface::setAutoContentLength()

Parameters

$auto

boolean

Exceptions

\Zend_Queue_Exception

Returns

\$this;

Set the body for this frame

setBody(string|null $body) : \Zend_Queue_Stomp_Frame

Set to null for no body.

inherited_from \Zend_Queue_Stomp_FrameInterface::setBody()

Parameters

$body

stringnull

Exceptions

\Zend_Queue_Exception

Returns

\Zend_Queue_Stomp_Frame

Set the body for this frame

setCommand($command) : \Zend_Queue_Stomp_Frame
inherited_from \Zend_Queue_Stomp_FrameInterface::setCommand()

Parameters

$command

Exceptions

\Zend_Queue_Exception

Returns

\Zend_Queue_Stomp_Frame

Sets a value for a header

setHeader(string $header, string $value) : \Zend_Queue_Stomp_Frame
inherited_from \Zend_Queue_Stomp_FrameInterface::setHeader()

Parameters

$header

string

$value

string

Exceptions

\Zend_Queue_Exception

Returns

\Zend_Queue_Stomp_Frame

Set the headers

setHeaders(array $headers) : \Zend_Queue_Stomp_Frame

Throws an exception if the array values are not strings.

inherited_from \Zend_Queue_Stomp_FrameInterface::setHeaders()
fluent This method is part of a fluent interface and will return the same instance

Parameters

$headers

array

Exceptions

\Zend_Queue_Exception

Returns

\Zend_Queue_Stomp_Frame

Takes the current parameters and returns a Stomp Frame

toFrame() : string
inherited_from \Zend_Queue_Stomp_FrameInterface::toFrame()

Exceptions

\Zend_Queue_Exception

Returns

string

 Properties

 

Do the content-length automatically?

$_autoContentLength 

Default

null
 

The body of the frame

$_body : string

Default

null
 

The command for the frame

$_command : string

Default

null
 

Headers for the frame

$_headers : array

Default

array()

 Constants

 

CONTENT_LENGTH

CONTENT_LENGTH = 'content-length' 
 

END_OF_FRAME

END_OF_FRAME = "\x00\n" 
 

EOL

EOL = "\n"