API Documentation

Wildfire/Protocol/JsonStream.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Wildfire
subpackage
Protocol
version
$Id: JsonStream.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Wildfire_Protocol_JsonStream

Description

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.

Zend_Wildfire_Protocol_JsonStream

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Wildfire
subpackage
Protocol
Constants
PROTOCOL_URI
Properties
$_messages
$_plugins
Methods
registerPlugin
recordMessage
clearMessages
getMessages
_encode
getPayload

Description

Encodes messages into the Wildfire JSON Stream Communication Protocol.

Constants

PROTOCOL_URI

 PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'

The protocol URI for this protocol

Details

value
http://meta.wildfirehq.org/Protocol/JsonStream/0.2

Properties

$_messages

array $_messages = 'array'

All messages to be sent.

Details

$_messages
array
visibility
protected
default
array
final
false
static
false

$_plugins

array $_plugins = 'array'

Plugins that are using this protocol

Details

$_plugins
array
visibility
protected
default
array
final
false
static
false

Methods

_encode

_encode( mixed $value ) : string

Use the JSON encoding scheme for the value specified

Arguments
$value
mixed
The value to be encoded
Output
string
The encoded value
Details
visibility
protected
final
false
static
false

clearMessages

clearMessages( Zend_Wildfire_Plugin_Interface $plugin ) : boolean

Remove all qued messages

Arguments
$plugin
Zend_Wildfire_Plugin_Interface
The plugin for which to clear messages
Output
boolean
Returns TRUE if messages were present
Details
visibility
public
final
false
static
false

getMessages

getMessages( ) : mixed

Get all qued messages

Output
mixed
Returns qued messages or FALSE if no messages are qued
Details
visibility
public
final
false
static
false

getPayload

getPayload( Zend_Wildfire_Channel_Interface $channel ) : mixed

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

Arguments
$channel
Zend_Wildfire_Channel_Interface
The instance of the channel that will be transmitting the data
Output
mixed
Returns the data to be sent by the channel.
Details
visibility
public
final
false
static
false
throws

recordMessage

recordMessage( Zend_Wildfire_Plugin_Interface $plugin, string $structure, array $data ) : boolean

Record a message with the given data in the given structure

Arguments
$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
Output
boolean
Returns TRUE if message was recorded
Details
visibility
public
final
false
static
false

registerPlugin

registerPlugin( Zend_Wildfire_Plugin_Interface $plugin ) : boolean

Register a plugin that uses this protocol

Arguments
$plugin
Zend_Wildfire_Plugin_Interface
The plugin to be registered
Output
boolean
Returns TRUE if plugin was registered, false if it was already registered
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.