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

Public Member Functions

 registerPlugin (Zend_Wildfire_Plugin_Interface $plugin)
 Register a plugin that uses this protocol.
 
 recordMessage (Zend_Wildfire_Plugin_Interface $plugin, $structure, $data)
 Record a message with the given data in the given structure.
 
 clearMessages (Zend_Wildfire_Plugin_Interface $plugin)
 Remove all qued messages.
 
 getMessages ()
 Get all qued messages.
 
 getPayload (Zend_Wildfire_Channel_Interface $channel)
 Retrieves all formatted data ready to be sent by the channel.
 

Public Attributes

const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'
 The protocol URI for this protocol.
 

Protected Member Functions

 _encode ($value)
 Use the JSON encoding scheme for the value specified.
 

Protected Attributes

 $_messages = array()
 
 $_plugins = array()
 

Member Function Documentation

_encode (   $value)
protected

Use the JSON encoding scheme for the value specified.

Parameters
mixed$valueThe value to be encoded
Returns
string The encoded value
clearMessages ( Zend_Wildfire_Plugin_Interface  $plugin)

Remove all qued messages.

Parameters
Zend_Wildfire_Plugin_Interface$pluginThe plugin for which to clear messages
Returns
boolean Returns TRUE if messages were present
getMessages ( )

Get all qued messages.

Returns
mixed Returns qued messages or FALSE if no messages are qued
getPayload ( Zend_Wildfire_Channel_Interface  $channel)

Retrieves all formatted data ready to be sent by the channel.

Parameters
Zend_Wildfire_Channel_Interface$channelThe instance of the channel that will be transmitting the data
Returns
mixed Returns the data to be sent by the channel.
Exceptions
Zend_Wildfire_Exception
recordMessage ( Zend_Wildfire_Plugin_Interface  $plugin,
  $structure,
  $data 
)

Record a message with the given data in the given structure.

Parameters
Zend_Wildfire_Plugin_Interface$pluginThe plugin recording the message
string$structureThe structure to be used for the data
array$dataThe data to be recorded
Returns
boolean Returns TRUE if message was recorded
registerPlugin ( Zend_Wildfire_Plugin_Interface  $plugin)

Register a plugin that uses this protocol.

Parameters
Zend_Wildfire_Plugin_Interface$pluginThe plugin to be registered
Returns
boolean Returns TRUE if plugin was registered, false if it was already registered

Member Data Documentation

$_messages = array()
protected
$_plugins = array()
protected
const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'

The protocol URI for this protocol.