Queue/Stomp/Frame.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Queue  
Subpackage
Stomp  
Version
$Id$  

\Zend_Queue_Stomp_Frame

Package: Zend_Queue\Stomp
This class represents a Stomp Frame
Implements
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

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

Properties

>VPropertyprotected$_autoContentLength = null
Do the content-length automatically?
Default valuenullDetails
Type
n/a
>VPropertyprotectedstring $_body = null
The body of the frame
Default valuenullDetails
Type
string
>VPropertyprotectedstring $_command = null
The command for the frame
Default valuenullDetails
Type
string
>VPropertyprotectedarray $_headers = array()
Headers for the frame
Default valuearray()Details
Type
array

Methods

methodpublic__construct() : void

Constructor

methodpublic__toString() : string

Returns
TypeDescription
string
Details
See
 
methodpublicfromFrame(string $frame) : \Zend_Queue_Stomp_Frame

Accepts a frame and deconstructs the frame into its component parts

Parameters
NameTypeDescription
$framestring
  • a stomp frame
Returns
TypeDescription
\Zend_Queue_Stomp_Frame
Details
Fluent
This method is part of a fluent interface and will return the same instance  
methodpublicgetAutoContentLength() : boolean

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
TypeDescription
boolean
methodpublicgetBody() : false | string

Return the body for this frame

Returns false if the body does not exist
Returns
TypeDescription
false | string
methodpublicgetCommand() : string | false

Return the command for this frame

Return false if the command does not exist
Returns
TypeDescription
string | false
methodpublicgetHeader(string $header) : string | false

Returns a value for a header

Returns false if the header does not exist.
Parameters
NameTypeDescription
$headerstring
Returns
TypeDescription
string | false
Throws
ExceptionDescription
\Zend_Queue_Exception
methodpublicgetHeaders() : array

Get the headers

Returns
TypeDescription
array
methodpublicsetAutoContentLength(boolean $auto) : \$this;

setAutoContentLength()

Set the value on or off.
Parameters
NameTypeDescription
$autoboolean
Returns
TypeDescription
\$this;
Throws
ExceptionDescription
\Zend_Queue_Exception
methodpublicsetBody(string | null $body) : \Zend_Queue_Stomp_Frame

Set the body for this frame

Set to null for no body.
Parameters
NameTypeDescription
$bodystring | null
Returns
TypeDescription
\Zend_Queue_Stomp_Frame
Throws
ExceptionDescription
\Zend_Queue_Exception
methodpublicsetCommand( $command) : \Zend_Queue_Stomp_Frame

Set the body for this frame

Parameters
NameTypeDescription
$command
Returns
TypeDescription
\Zend_Queue_Stomp_Frame
Throws
ExceptionDescription
\Zend_Queue_Exception
methodpublicsetHeader(string $header, string $value) : \Zend_Queue_Stomp_Frame

Sets a value for a header

Parameters
NameTypeDescription
$headerstring
$valuestring
Returns
TypeDescription
\Zend_Queue_Stomp_Frame
Throws
ExceptionDescription
\Zend_Queue_Exception
methodpublicsetHeaders(array $headers) : \Zend_Queue_Stomp_Frame

Set the headers

Throws an exception if the array values are not strings.
Parameters
NameTypeDescription
$headersarray
Returns
TypeDescription
\Zend_Queue_Stomp_Frame
Throws
ExceptionDescription
\Zend_Queue_Exception
Details
Fluent
This method is part of a fluent interface and will return the same instance  
methodpublictoFrame() : string

Takes the current parameters and returns a Stomp Frame

Returns
TypeDescription
string
Throws
ExceptionDescription
\Zend_Queue_Exception
Documentation was generated by phpDocumentor 2.2.0 .