API Documentation

Zend/Wildfire/Plugin/FirePhp.php

Show: inherited
Table of Contents

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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Wildfire  
Subpackage
Plugin  
Version
$Id: FirePhp.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Wildfire_Plugin_FirePhp

Package: Zend\Wildfire\Plugin

Primary class for communicating with the FirePHP Firefox Extension.

Implements
\Zend_Wildfire_Plugin_Interface
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  LOG = 'LOG'

Plain log style.

Constant  INFO = 'INFO'

Information style.

Constant  WARN = 'WARN'

Warning style.

Constant  ERROR = 'ERROR'

Error style that increments Firebug's error counter.

Constant  TRACE = 'TRACE'

Trace style showing message and expandable full stack trace.

Constant  EXCEPTION = 'EXCEPTION'

Exception style showing message and expandable full stack trace.

Also increments Firebug's error counter.

Constant  TABLE = 'TABLE'

Table style showing summary line and expandable table

Constant  DUMP = 'DUMP'

Dump variable to Server panel in Firebug Request Inspector

Constant  GROUP_START = 'GROUP_START'

Start a group in the Firebug Console

Constant  GROUP_END = 'GROUP_END'

End a group in the Firebug Console

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

The plugin URI for this plugin

Constant  PROTOCOL_URI = Zend_Wildfire_Protocol_JsonStream::PROTOCOL_URI

The protocol URI for this plugin

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

The structure URI for the Dump structure

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

The structure URI for the Firebug Console structure

Properties

Propertyprotected\Zend_Wildfire_Channel_Interface  $_channel= 'null'

The channel via which to send the encoded messages.

Default valuenullDetails
Type
\Zend_Wildfire_Channel_Interface
Propertyprotectedboolean  $_enabled= 'true'

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

Default valuetrueDetails
Type
boolean
Propertyprotected\Zend_Wildfire_Plugin_FirePhp  $_instance= 'null'
static

Singleton instance

Default valuenullDetails
Type
\Zend_Wildfire_Plugin_FirePhp
Propertyprotectedarray  $_messages= 'array()'

Messages that are buffered to be sent when protocol flushes

Default valuearray()Details
Type
array
Propertyprotectedarray  $_objectFilters= 'array()'

Filters used to exclude object members when encoding

Default valuearray()Details
Type
array
Propertyprotectedarray  $_objectStack= 'array()'

A stack of objects used during encoding to detect recursion

Default valuearray()Details
Type
array
Propertyprotectedarray  $_options= 'array( 'traceOffset' => 1'

Options for the object

Default valuearray( 'traceOffset' => 1Details
Type
array

Methods

methodprotected__construct( ) : void

Constructor

methodprotected_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.

Parameters
Name Type Description
$object mixed

The object/array/value to be encoded

$objectDepth
$arrayDepth
Returns
Type Description
array The encoded object
methodprotected_encodeTable(  $table ) : array

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

Parameters
Name Type Description
$table
Returns
Type Description
array
methodprotected_encodeTrace(  $trace ) : array

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

Parameters
Name Type Description
$trace
Returns
Type Description
array The encoded trace
methodprotected_getStackTrace( array $options ) : array

Gets a stack trace

Parameters
Name Type Description
$options array

Options to change how the stack trace is returned

Returns
Type Description
array The stack trace
methodprotected_recordMessage( string $structure, array $data, boolean $skipEncode = false ) : boolean

Record a message with the given data in the given structure

Parameters
Name Type Description
$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

Returns
Type Description
boolean Returns TRUE if message was recorded
Throws
Exception Description
\Zend_Wildfire_Exception
methodpublicdestroyInstance( ) : void
static

Destroys the singleton instance

Primarily used for testing.

methodpublicflushMessages( string $protocolUri ) : void

Flush any buffered data.

Parameters
Name Type Description
$protocolUri string

The URI of the protocol that should be flushed to

methodpublicgetEnabled( ) : boolean

Determine if logging to user-agent is enabled.

Returns
Type Description
boolean Returns TRUE if logging is enabled.
methodpublicgetInstance( bool $skipCreate = false ) : \Zend_Wildfire_Plugin_FirePhp
static

Get or create singleton instance

Parameters
Name Type Description
$skipCreate bool

True if an instance should not be created

Returns
Type Description
\Zend_Wildfire_Plugin_FirePhp
methodpublicgetOption( string $key ) : mixed

Retrieve a single option

Parameters
Name Type Description
$key string

The name of the option

Returns
Type Description
mixed The value of the option
methodpublicgetOptions( ) : array

Retrieve all options

Returns
Type Description
array All options
methodpublicgetUri( ) : string

Get the unique indentifier for this plugin.

Returns
Type Description
string Returns the URI of the plugin.
methodpublicgroup( string $title, array $options = array() ) : TRUE
static

Starts a group in the Firebug Console

Parameters
Name Type Description
$title string

The title of the group

$options array

OPTIONAL Setting 'Collapsed' to true will initialize group collapsed instead of expanded

Returns
Type Description
TRUE if the group instruction was added to the response headers or buffered.
methodpublicgroupEnd( ) : TRUE
static

Ends a group in the Firebug Console

Returns
Type Description
TRUE if the group instruction was added to the response headers or buffered.
methodpublicinit( string $class = null ) : \Zend_Wildfire_Plugin_FirePhp
static

Create singleton instance.

Parameters
Name Type Description
$class string

OPTIONAL Subclass of Zend_Wildfire_Plugin_FirePhp

Returns
Type Description
\Zend_Wildfire_Plugin_FirePhp Returns the singleton Zend_Wildfire_Plugin_FirePhp instance
Throws
Exception Description
\Zend_Wildfire_Exception
methodpublicsend( mixed $var, string $label = null, string $style = null, array $options = array() ) : boolean
static

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

Parameters
Name Type Description
$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

Returns
Type Description
boolean Returns TRUE if the variable was added to the response headers or buffered.
Throws
Exception Description
\Zend_Wildfire_Exception
methodpublicsetEnabled( boolean $enabled ) : boolean

Enable or disable sending of messages to user-agent.

If disabled all headers to be sent will be removed.

Parameters
Name Type Description
$enabled boolean

Set to TRUE to enable sending of messages.

Returns
Type Description
boolean The previous value.
methodpublicsetObjectFilter(  $class,  $filter ) : void

Specify a filter to be used when encoding an object

Filters are used to exclude object members.

Parameters
Name Type Description
$class
$filter
methodpublicsetOption( string $key, mixed $value ) : mixed

Set a single option

Parameters
Name Type Description
$key string

The name of the option

$value mixed

The value of the option

Returns
Type Description
mixed The previous value of the option
Documentation was generated by DocBlox 0.15.1.