Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Zend_Queue_Stomp_Frame Class Reference

Public Member Functions

 __construct ()
 Constructor.
 
 getAutoContentLength ()
 get the status of the auto content length
 
 setAutoContentLength ($auto)
 setAutoContentLength()
 
 getHeaders ()
 Get the headers.
 
 setHeaders (array $headers)
 Set the headers.
 
 setHeader ($header, $value)
 Sets a value for a header.
 
 getHeader ($header)
 Returns a value for a header.
 
 getBody ()
 Return the body for this frame.
 
 setBody ($body)
 Set the body for this frame.
 
 getCommand ()
 Return the command for this frame.
 
 setCommand ($command)
 Set the body for this frame.
 
 toFrame ()
 Takes the current parameters and returns a Stomp Frame.
 
 __toString ()
 
 fromFrame ($frame)
 Accepts a frame and deconstructs the frame into its component parts.
 

Public Attributes

const END_OF_FRAME = "\x00\n"
 
const CONTENT_LENGTH = 'content-length'
 
const EOL = "\n"
 

Protected Attributes

 $_headers = array()
 
 $_command = null
 
 $_body = null
 
 $_autoContentLength = null
 Do the content-length automatically?
 

Constructor & Destructor Documentation

__construct ( )

Constructor.

Member Function Documentation

__toString ( )
See Also
toFrame()
Returns
string

Implements Zend_Queue_Stomp_FrameInterface.

fromFrame (   $frame)

Accepts a frame and deconstructs the frame into its component parts.

Parameters
string$frame- a stomp frame
Returns
$this

Implements Zend_Queue_Stomp_FrameInterface.

getAutoContentLength ( )

get the status of the auto content length

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.

Returns
boolean

Implements Zend_Queue_Stomp_FrameInterface.

getBody ( )

Return the body for this frame.

Returns false if the body does not exist

Returns
false|string

Implements Zend_Queue_Stomp_FrameInterface.

getCommand ( )

Return the command for this frame.

Return false if the command does not exist

Returns
string|false

Implements Zend_Queue_Stomp_FrameInterface.

getHeader (   $header)

Returns a value for a header.

Returns false if the header does not exist.

Parameters
string$header
Returns
string|false
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Stomp_FrameInterface.

getHeaders ( )

Get the headers.

Returns
array

Implements Zend_Queue_Stomp_FrameInterface.

setAutoContentLength (   $auto)

setAutoContentLength()

Set the value on or off.

Parameters
boolean$auto
Returns
$this;
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Stomp_FrameInterface.

setBody (   $body)

Set the body for this frame.

Set to null for no body.

Parameters
string | null$body
Returns
Zend_Queue_Stomp_Frame
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Stomp_FrameInterface.

setCommand (   $command)

Set the body for this frame.

Parameters
string|null
Returns
Zend_Queue_Stomp_Frame
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Stomp_FrameInterface.

setHeader (   $header,
  $value 
)

Sets a value for a header.

Parameters
string$header
string$value
Returns
Zend_Queue_Stomp_Frame
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Stomp_FrameInterface.

setHeaders ( array  $headers)

Set the headers.

Throws an exception if the array values are not strings.

Parameters
array$headers
Returns
$this
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Stomp_FrameInterface.

toFrame ( )

Takes the current parameters and returns a Stomp Frame.

Returns
string
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Stomp_FrameInterface.

Member Data Documentation

$_autoContentLength = null
protected

Do the content-length automatically?

$_body = null
protected
$_command = null
protected
$_headers = array()
protected
const CONTENT_LENGTH = 'content-length'
const END_OF_FRAME = "\x00\n"
const EOL = "\n"