Wildfire/Plugin/FirePhp.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 [email protected] 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 24593 2012-01-05 20:35:02Z matthew $
\Zend_Wildfire_Plugin_FirePhp
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
EXCEPTION
= 'EXCEPTION'Exception style showing message and expandable full stack trace.
Also increments Firebug's error counter.
PLUGIN_URI
= 'http://meta.firephp.org/Wildfire/Plugin/ZendFramework/FirePHP/1.6.2'The plugin URI for this plugin
STRUCTURE_URI_DUMP
= 'http://meta.firephp.org/Wildfire/Structure/FirePHP/Dump/0.1'The structure URI for the Dump structure
Properties

\Zend_Wildfire_Channel_Interface $_channel = nullThe channel via which to send the encoded messages.
nullDetails

boolean $_enabled = trueFlag indicating whether FirePHP should send messages to the user-agent.
trueDetails- Type
- boolean

array $_messages = array()Messages that are buffered to be sent when protocol flushes
array()Details- Type
- array

array $_objectFilters = array()Filters used to exclude object members when encoding
array()Details- Type
- array

array $_objectStack = array()A stack of objects used during encoding to detect recursion
array()Details- Type
- array

array $_options = array('traceOffset' => 1, 'maxTraceDepth' => 99, 'maxObjectDepth' => 10, 'maxArrayDepth' => 20, 'includeLineNumbers' => true)Options for the object
array('traceOffset' => 1, 'maxTraceDepth' => 99, 'maxObjectDepth' => 10, 'maxArrayDepth' => 20, 'includeLineNumbers' => true)Details- Type
- array
Methods

_encodeObject(mixed $object, $objectDepth = 1, $arrayDepth = 1) : arrayEncode 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.
| Name | Type | Description |
|---|---|---|
| $object | mixed | The object/array/value to be encoded |
| $objectDepth | ||
| $arrayDepth |
| Type | Description |
|---|---|
| array | The encoded object |

_encodeTable( $table) : arrayEncodes a table by encoding each row and column with _encodeObject()
| Name | Type | Description |
|---|---|---|
| $table |
| Type | Description |
|---|---|
| array |

_encodeTrace( $trace) : arrayEncodes a trace by encoding all "args" with _encodeObject()
| Name | Type | Description |
|---|---|---|
| $trace |
| Type | Description |
|---|---|
| array | The encoded trace |

_getStackTrace(array $options) : arrayGets a stack trace
| Name | Type | Description |
|---|---|---|
| $options | array | Options to change how the stack trace is returned |
| Type | Description |
|---|---|
| array | The stack trace |

_recordMessage(string $structure, array $data, boolean $skipEncode = false) : booleanRecord a message with the given data in the given structure
| 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 |
| Type | Description |
|---|---|
| boolean | Returns TRUE if message was recorded |
| Exception | Description |
|---|---|
| \Zend_Wildfire_Exception |

flushMessages(string $protocolUri) : voidFlush any buffered data.
| Name | Type | Description |
|---|---|---|
| $protocolUri | string | The URI of the protocol that should be flushed to |

getEnabled() : booleanDetermine if logging to user-agent is enabled.
| Type | Description |
|---|---|
| boolean | Returns TRUE if logging is enabled. |

getInstance(bool $skipCreate = false) : \Zend_Wildfire_Plugin_FirePhpGet or create singleton instance
| Name | Type | Description |
|---|---|---|
| $skipCreate | bool | True if an instance should not be created |
| Type | Description |
|---|---|
| \Zend_Wildfire_Plugin_FirePhp |

getOption(string $key) : mixedRetrieve a single option
| Name | Type | Description |
|---|---|---|
| $key | string | The name of the option |
| Type | Description |
|---|---|
| mixed | The value of the option |

getUri() : stringGet the unique indentifier for this plugin.
| Type | Description |
|---|---|
| string | Returns the URI of the plugin. |

group(string $title, array $options = array()) : TRUEStarts a group in the Firebug Console
| Name | Type | Description |
|---|---|---|
| $title | string | The title of the group |
| $options | array | OPTIONAL Setting 'Collapsed' to true will initialize group collapsed instead of expanded |
| Type | Description |
|---|---|
| TRUE | if the group instruction was added to the response headers or buffered. |

groupEnd() : TRUEEnds a group in the Firebug Console
| Type | Description |
|---|---|
| TRUE | if the group instruction was added to the response headers or buffered. |

init(string $class = null) : \Zend_Wildfire_Plugin_FirePhpCreate singleton instance.
| Name | Type | Description |
|---|---|---|
| $class | string | OPTIONAL Subclass of Zend_Wildfire_Plugin_FirePhp |
| Type | Description |
|---|---|
| \Zend_Wildfire_Plugin_FirePhp | Returns the singleton Zend_Wildfire_Plugin_FirePhp instance |
| Exception | Description |
|---|---|
| \Zend_Wildfire_Exception |

send(mixed $var, string $label = null, string $style = null, array $options = array()) : booleanLogs variables to the Firebug Console via HTTP response headers and the FirePHP Firefox Extension.
| 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 |
| Type | Description |
|---|---|
| boolean | Returns TRUE if the variable was added to the response headers or buffered. |
| Exception | Description |
|---|---|
| \Zend_Wildfire_Exception |

setEnabled(boolean $enabled) : booleanEnable or disable sending of messages to user-agent.
If disabled all headers to be sent will be removed.
| Name | Type | Description |
|---|---|---|
| $enabled | boolean | Set to TRUE to enable sending of messages. |
| Type | Description |
|---|---|
| boolean | The previous value. |

setObjectFilter( $class, $filter) : voidSpecify a filter to be used when encoding an object
Filters are used to exclude object members.
| Name | Type | Description |
|---|---|---|
| $class | ||
| $filter |