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.
Encodes messages into the Wildfire JSON Stream Communication Protocol.

_encode(
mixed $value
)
:
string
Use the JSON encoding scheme for the value specified
Name | Type | Description |
---|---|---|
$value | mixed | The value to be encoded |
Type | Description |
---|---|
string | The encoded value |

clearMessages(
\Zend_Wildfire_Plugin_Interface $plugin
)
:
boolean
Remove all qued messages
Name | Type | Description |
---|---|---|
$plugin | \Zend_Wildfire_Plugin_Interface | The plugin for which to clear messages |
Type | Description |
---|---|
boolean | Returns TRUE if messages were present |

getMessages(
)
:
mixed
Get all qued messages
Type | Description |
---|---|
mixed | Returns qued messages or FALSE if no messages are qued |

getPayload(
\Zend_Wildfire_Channel_Interface $channel
)
:
mixed
Retrieves all formatted data ready to be sent by the channel.
Name | Type | Description |
---|---|---|
$channel | \Zend_Wildfire_Channel_Interface | The instance of the channel that will be transmitting the data |
Type | Description |
---|---|
mixed | Returns the data to be sent by the channel. |
Exception | Description |
---|---|
\Zend_Wildfire_Exception |

recordMessage(
\Zend_Wildfire_Plugin_Interface $plugin, string $structure, array $data
)
:
boolean
Record a message with the given data in the given structure
Name | Type | Description |
---|---|---|
$plugin | \Zend_Wildfire_Plugin_Interface | The plugin recording the message |
$structure | string | The structure to be used for the data |
$data | array | The data to be recorded |
Type | Description |
---|---|
boolean | Returns TRUE if message was recorded |

registerPlugin(
\Zend_Wildfire_Plugin_Interface $plugin
)
:
boolean
Register a plugin that uses this protocol
Name | Type | Description |
---|---|---|
$plugin | \Zend_Wildfire_Plugin_Interface | The plugin to be registered |
Type | Description |
---|---|
boolean | Returns TRUE if plugin was registered, false if it was already registered |