Hazaar\Logger\Backend
FirePHP
Sends the given data to the FirePHP Firefox Extension.

The data can be displayed in the Firebug Console or in the "Server" request tab.

For more information see: http://www.firephp.org/

Summary
MethodsPropertiesConstants
Constants
DUMP
DUMP : type
Dumps a variable to firebug's server panel

Type

\type - desc
ERROR
ERROR : type
Firebug ERROR level

Logs a message to firebug console, displays an error icon before the message and colors the line yellow. Also increments the firebug error count.

Type

\type - desc
EXCEPTION
EXCEPTION : type
Displays an exception in firebug console

Increments the firebug error count.

Type

\type - desc
GROUP_END
GROUP_END : type
Ends a group in firebug console

Type

\type - desc
GROUP_START
GROUP_START : type
Starts a group in firebug console

Type

\type - desc
INFO
INFO : type
Firebug INFO level

Logs a message to firebug console and displays an info icon before the message.

Type

\type - desc
LOG
LOG : type
Firebug LOG level

Logs a message to firebug console.

Type

\type - desc
TABLE
TABLE : type
Displays an table in firebug console

Type

\type - desc
TRACE
TRACE : type
Displays a stack trace in firebug console

Type

\type - desc
VERSION
VERSION : type
FirePHP version

Type

\type - desc
WARN
WARN : type
Firebug WARN level

Logs a message to firebug console, displays an warning icon before the message and colors the line turquoise.

Type

\type - desc
Properties
$convertAssertionErrorsToExceptions
$convertAssertionErrorsToExceptions
Flag whether to convert PHP assertion errors to Exceptions
$enabled
$enabled
Flag to enable/disable logging
$inExceptionHandler
$inExceptionHandler
Flag whether we are logging from within the exception handler
Static
$instance
$instance
Singleton instance of FirePHP
$json_objectStack
$json_objectStack
Keep a list of objects as we descend into the array so we can detect recursion.
$logToInsightConsole
$logToInsightConsole
The insight console to log to if applicable
$messageIndex
$messageIndex
Wildfire protocol message index
$objectFilters
$objectFilters
Filters used to exclude object members when encoding
$objectStack
$objectStack
A stack of objects used to detect recursion during object encoding
$options
$options
Options for the library
$throwAssertionExceptions
$throwAssertionExceptions
Flag whether to throw PHP assertion errors that have been converted to Exceptions
$throwErrorExceptions
$throwErrorExceptions
Flag whether to throw PHP errors that have been converted to ErrorExceptions
Methods
__sleep()
__sleep() : array
When the object gets serialized only include specific object members.
_escapeTrace()
_escapeTrace($Trace) : array
Escape trace path for windows systems
_escapeTraceFile()
_escapeTraceFile($File) : string
Escape file information of trace for windows systems
_standardizePath()
_standardizePath($Path) : string
Standardizes path for windows systems.
assertionHandler()
assertionHandler($file, $line, $code)
FirePHP's assertion handler

Logs all assertions to your firebug console and then stops the script.

detectClientExtension()
detectClientExtension() : boolean
Check if FirePHP is installed on client
dump()
dump($Key, $Variable, $Options = Array ( ) ) : true
Dumps key and variable to firebug server panel
encodeObject()
encodeObject($Object, $ObjectDepth = 1, $ArrayDepth = 1, $MaxDepth = 1) : array
Encodes an object including members with

protected and private visibility

encodeTable()
encodeTable($Table) : array
Encodes a table by encoding each row and column with encodeObject()
error()
error($Object, $Label = null, $Options = Array ( ) ) : true
Log object with label to firebug console
errorHandler()
errorHandler($errno, $errstr, $errfile, $errline, $errcontext)
FirePHP's error handler

Throws exception for each php error that will occur.

exceptionHandler()
exceptionHandler($Exception)
FirePHP's exception handler

Logs all exceptions to your firebug console and then stops the script.

fb()
fb($Object) : true
Log varible to Firebug
Static
getAllRequestHeaders()
getAllRequestHeaders() : array
Get all request headers
getEnabled()
getEnabled() : boolean
Check if logging is enabled
Static
getInstance()
getInstance($AutoCreate = false) : FirePHP
Gets singleton instance of FirePHP
getOption()
getOption($Name) : mixed
Get an option from the library
getOptions()
getOptions() : array
Get options from the library
getRequestHeader()
getRequestHeader($Name) : string|false
Get a request header
getUserAgent()
getUserAgent() : string|false
Get user agent
group()
group($Name, $Options = null) : true
Start a group for following messages.

Options: Collapsed: [true|false] Color: [#RRGGBB|ColorName]

groupEnd()
groupEnd() : true
Ends a group you have started before
headersSent()
headersSent($Filename, $Linenum)
Check if headers have already been sent
info()
info($Object, $Label = null, $Options = Array ( ) ) : true
Log object with label to firebug console
Static
init()
init() : FirePHP
Creates FirePHP object and stores it for singleton access
Static
is_utf8()
is_utf8($str) : boolean
Returns true if $string is valid UTF-8 and false otherwise.
jsonEncode()
jsonEncode($Object, $skipObjectEncode = false) : string
Encode an object into a JSON string

Uses PHP's jeson_encode() if available

json_encode()
json_encode($var) : mixed
encodes an arbitrary variable into JSON format
json_name_value()
json_name_value($name, $value) : string
array-walking function for use in generating JSON-formatted name-value pairs
json_utf82utf16()
json_utf82utf16($utf8) : string
convert a string from one UTF-8 char to one UTF-16 char

Normally should be handled by mb_convert_encoding, but provides a slower PHP-only method for installations that lack the multibye string extension.

log()
log($Object, $Label = null, $Options = Array ( ) ) : true
Log object with label to firebug console
newException()
newException($Message) : Exception
Returns a new \Exception
Static
plugin()
plugin()
Insight API wrapper
registerAssertionHandler()
registerAssertionHandler($convertAssertionErrorsToExceptions = true, $throwAssertionExceptions = false) : mixed
Register FirePHP driver as your assert callback
registerErrorHandler()
registerErrorHandler($throwErrorExceptions = false) : mixed
Register FirePHP as your error handler

Will throw exceptions for each php error.

registerExceptionHandler()
registerExceptionHandler() : mixed
Register FirePHP as your exception handler
setEnabled()
setEnabled($Enabled) : void
Enable and disable logging to Firebug
setHeader()
setHeader($Name, $Value)
Send header
Static
setInstance()
setInstance($instance) : FirePHP
Set the instance of the FirePHP singleton
setLogToInsightConsole()
setLogToInsightConsole($console) : void
Set an Insight console to direct all logging calls to
setObjectFilter()
setObjectFilter($Class, $Filter) : void
Specify a filter to be used when encoding an object

Filters are used to exclude object members.

setOption()
setOption($Name, $Value) : void
Set an option for the library
setOptions()
setOptions($Options) : void
Set some options for the library

Options:

  • maxDepth: The maximum depth to traverse (default: 10)
  • maxObjectDepth: The maximum depth to traverse objects (default: 5)
  • maxArrayDepth: The maximum depth to traverse arrays (default: 5)
  • useNativeJsonEncode: If true will use json_encode() (default: true)
  • includeLineNumbers: If true will include line numbers and filenames (default: true)
setProcessorUrl()
setProcessorUrl($URL)
setRendererUrl()
setRendererUrl($URL)
table()
table($Label, $Table, $Options = Array ( ) ) : true
Log a table in the firebug console
Static
to()
to()
Insight API wrapper
trace()
trace($Label) : true
Log a trace in the firebug console
warn()
warn($Object, $Label = null, $Options = Array ( ) ) : true
Log object with label to firebug console