Wildfire/Protocol/JsonStream.php
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-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Wildfire
- subpackage
- Protocol
- version
- $Id: JsonStream.php 23775 2011-03-01 17:25:24Z ralph $
\Zend_Wildfire_Protocol_JsonStream
Encodes messages into the Wildfire JSON Stream Communication Protocol.
- category
- Zend
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Wildfire
- subpackage
- Protocol
Constants


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



array
$_plugins= 'array'
Plugins that are using this protocol
Default valuearray
Details
- Type
- array
Methods



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



getPayload(
\Zend_Wildfire_Channel_Interface $channel
)
:
mixed
Retrieves all formatted data ready to be sent by the channel.
Parameters
Returns
Type |
Description |
mixed |
Returns the data to be sent by the channel. |
Throws



recordMessage(
\Zend_Wildfire_Plugin_Interface $plugin, string $structure, array $data
)
:
boolean
Record a message with the given data in the given structure
Parameters
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 |
Returns
Type |
Description |
boolean |
Returns TRUE if message was recorded |



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