API Documentation

Wildfire/Plugin/FirePhp.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
Plugin
version
$Id: FirePhp.php 23068 2010-10-10 00:00:43Z cadorn $
Classes
Zend_Wildfire_Plugin_FirePhp

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_Plugin_FirePhp

Implements
Zend_Wildfire_Plugin_Interface
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
Plugin
Constants
LOG
INFO
WARN
ERROR
TRACE
EXCEPTION
TABLE
DUMP
GROUP_START
GROUP_END
PLUGIN_URI
PROTOCOL_URI
STRUCTURE_URI_DUMP
STRUCTURE_URI_FIREBUGCONSOLE
Properties
$_instance
$_enabled
$_channel
$_messages
$_options
$_objectFilters
$_objectStack
Methods
init
__construct
getInstance
destroyInstance
setEnabled
getEnabled
setOption
getOption
getOptions
setObjectFilter
group
groupEnd
send
_getStackTrace
_recordMessage
_encodeTable
_encodeTrace
_encodeObject
getUri
flushMessages

Description

Primary class for communicating with the FirePHP Firefox Extension.

Constants

LOG

 LOG = 'LOG'

Plain log style.

Details

value
LOG

INFO

 INFO = 'INFO'

Information style.

Details

value
INFO

WARN

 WARN = 'WARN'

Warning style.

Details

value
WARN

ERROR

 ERROR = 'ERROR'

Error style that increments Firebug's error counter.

Details

value
ERROR

TRACE

 TRACE = 'TRACE'

Trace style showing message and expandable full stack trace.

Details

value
TRACE

EXCEPTION

 EXCEPTION = 'EXCEPTION'

Exception style showing message and expandable full stack trace.

Also increments Firebug's error counter.

Details

value
EXCEPTION

TABLE

 TABLE = 'TABLE'

Table style showing summary line and expandable table

Details

value
TABLE

DUMP

 DUMP = 'DUMP'

Dump variable to Server panel in Firebug Request Inspector

Details

value
DUMP

GROUP_START

 GROUP_START = 'GROUP_START'

Start a group in the Firebug Console

Details

value
GROUP_START

GROUP_END

 GROUP_END = 'GROUP_END'

End a group in the Firebug Console

Details

value
GROUP_END

PLUGIN_URI

 PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/ZendFramework/FirePHP/1.6.2'

The plugin URI for this plugin

Details

value
http://meta.firephp.org/Wildfire/Plugin/ZendFramework/FirePHP/1.6.2

PROTOCOL_URI

 PROTOCOL_URI = 'Zend_Wildfire_Protocol_JsonStream'

The protocol URI for this plugin

Details

value
Zend_Wildfire_Protocol_JsonStream

STRUCTURE_URI_DUMP

 STRUCTURE_URI_DUMP = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/Dump/0.1'

The structure URI for the Dump structure

Details

value
http://meta.firephp.org/Wildfire/Structure/FirePHP/Dump/0.1

STRUCTURE_URI_FIREBUGCONSOLE

 STRUCTURE_URI_FIREBUGCONSOLE = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'

The structure URI for the Firebug Console structure

Details

value
http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1

Properties

$_channel

Zend_Wildfire_Channel_Interface $_channel = 'null'

The channel via which to send the encoded messages.

Details

$_channel
Zend_Wildfire_Channel_Interface
visibility
protected
default
null
final
false
static
false

$_enabled

boolean $_enabled = 'true'

Flag indicating whether FirePHP should send messages to the user-agent.

Details

$_enabled
boolean
visibility
protected
default
true
final
false
static
false

$_instance

Zend_Wildfire_Plugin_FirePhp $_instance = 'null'

Singleton instance

Details

$_instance
Zend_Wildfire_Plugin_FirePhp
visibility
protected
default
null
final
false
static
true

$_messages

array $_messages = 'array'

Messages that are buffered to be sent when protocol flushes

Details

$_messages
array
visibility
protected
default
array
final
false
static
false

$_objectFilters

array $_objectFilters = 'array'

Filters used to exclude object members when encoding

Details

$_objectFilters
array
visibility
protected
default
array
final
false
static
false

$_objectStack

array $_objectStack = 'array'

A stack of objects used during encoding to detect recursion

Details

$_objectStack
array
visibility
protected
default
array
final
false
static
false

$_options

array $_options = 'array'

Options for the object

Details

$_options
array
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct( ) : void

Constructor

Details
visibility
protected
final
false
static
false

_encodeObject

_encodeObject( mixed $object,  $objectDepth = 1,  $arrayDepth = 1 ) : array

Encode an object by generating an array containing all object members.

All private and protected members are included. Some meta info about the object class is added.

Arguments
$object
mixed
The object/array/value to be encoded
$objectDepth
$arrayDepth
Output
array
The encoded object
Details
visibility
protected
final
false
static
false

_encodeTable

_encodeTable(  $table ) : array

Encodes a table by encoding each row and column with _encodeObject()

Arguments
$table
Output
array
Details
visibility
protected
final
false
static
false

_encodeTrace

_encodeTrace(  $trace ) : array

Encodes a trace by encoding all "args" with _encodeObject()

Arguments
$trace
Output
array
The encoded trace
Details
visibility
protected
final
false
static
false

_getStackTrace

_getStackTrace( array $options ) : array

Gets a stack trace

Arguments
$options
array
Options to change how the stack trace is returned
Output
array
The stack trace
Details
visibility
protected
final
false
static
false

_recordMessage

_recordMessage( string $structure, array $data, boolean $skipEncode = false ) : boolean

Record a message with the given data in the given structure

Arguments
$structure
string
The structure to be used for the data
$data
array
The data to be recorded
$skipEncode
boolean
TRUE if variable encoding should be skipped
Output
boolean
Returns TRUE if message was recorded
Details
visibility
protected
final
false
static
false
throws

destroyInstance

destroyInstance( ) : void

Destroys the singleton instance

Primarily used for testing.

Details
visibility
public
final
false
static
true

flushMessages

flushMessages( string $protocolUri ) : void

Flush any buffered data.

Arguments
$protocolUri
string
The URI of the protocol that should be flushed to
Details
visibility
public
final
false
static
false

getEnabled

getEnabled( ) : boolean

Determine if logging to user-agent is enabled.

Output
boolean
Returns TRUE if logging is enabled.
Details
visibility
public
final
false
static
false

getInstance

getInstance( $skipCreate $skipCreate = false ) : Zend_Wildfire_Plugin_FirePhp

Get or create singleton instance

Arguments
$skipCreate
$skipCreate
boolean True if an instance should not be created
Details
visibility
public
final
false
static
true

getOption

getOption( string $key ) : mixed

Retrieve a single option

Arguments
$key
string
The name of the option
Output
mixed
The value of the option
Details
visibility
public
final
false
static
false

getOptions

getOptions( ) : array

Retrieve all options

Output
array
All options
Details
visibility
public
final
false
static
false

getUri

getUri( ) : string

Get the unique indentifier for this plugin.

Output
string
Returns the URI of the plugin.
Details
visibility
public
final
false
static
false

group

group( string $title ) : TRUE

Starts a group in the Firebug Console

Arguments
$title
string
The title of the group
Output
TRUE
if the group instruction was added to the response headers or buffered.
Details
visibility
public
final
false
static
true

groupEnd

groupEnd( ) : TRUE

Ends a group in the Firebug Console

Output
TRUE
if the group instruction was added to the response headers or buffered.
Details
visibility
public
final
false
static
true

init

init( string $class = null ) : Zend_Wildfire_Plugin_FirePhp

Create singleton instance.

Arguments
$class
string
OPTIONAL Subclass of Zend_Wildfire_Plugin_FirePhp
Output
Zend_Wildfire_Plugin_FirePhp
Returns the singleton Zend_Wildfire_Plugin_FirePhp instance
Details
visibility
public
final
false
static
true
throws

send

send( mixed $var, string $label = null, string $style = null, array $options = array ) : boolean

Logs variables to the Firebug Console via HTTP response headers and the FirePHP Firefox Extension.

Arguments
$var
mixed
The variable to log.
$label
string
OPTIONAL Label to prepend to the log event.
$style
string
OPTIONAL Style of the log event.
$options
array
OPTIONAL Options to change how messages are processed and sent
Output
boolean
Returns TRUE if the variable was added to the response headers or buffered.
Details
visibility
public
final
false
static
true
throws

setEnabled

setEnabled( boolean $enabled ) : boolean

Enable or disable sending of messages to user-agent.

If disabled all headers to be sent will be removed.

Arguments
$enabled
boolean
Set to TRUE to enable sending of messages.
Output
boolean
The previous value.
Details
visibility
public
final
false
static
false

setObjectFilter

setObjectFilter(  $class,  $filter ) : void

Specify a filter to be used when encoding an object

Filters are used to exclude object members.

Arguments
$class
$filter
Details
visibility
public
final
false
static
false

setOption

setOption( string $key, mixed $value ) : mixed

Set a single option

Arguments
$key
string
The name of the option
$value
mixed
The value of the option
Output
mixed
The previous value of the option
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.