Class FirePHP

Description

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/

Located in /sources/firephp.php (line 349)


	
			
Variable Summary
Method Summary
FirePHP FirePHP ()
void assertionHandler (string $file, int $line, mixed $code)
true dump (string $Key, mixed $Variable)
array encodeObject (Object $Object, [ $ObjectDepth = 1], [ $ArrayDepth = 1], int $Depth)
array encodeTable (array $Table)
true error (mixes $Object, [string $Label = null])
void errorHandler (int $errno, string $errstr, string $errfile, int $errline, array $errcontext)
true fb (mixed $Object)
boolean getEnabled ()
FirePHP &getInstance ([boolean $AutoCreate = false])
array getOptions ()
string|false getUserAgent ()
true group (string $Name, [array $Options = null])
true groupEnd ()
true info (mixes $Object, [string $Label = null])
boolean is_utf8 (mixed $str)
string jsonEncode (object $Object, [ $skipObjectEncode = false])
mixed json_encode (mixed $var)
true log (mixes $Object, [string $Label = null])
void setEnabled (boolean $Enabled)
void setHeader (string $Name, string_type $Value)
void setObjectFilter (string $Class, array $Filter)
void setOptions (array $Options)
void setProcessorUrl (string $URL)
void setRendererUrl (string $URL)
true table (string $Label, string $Table)
true trace (string $Label)
true warn (mixes $Object, [string $Label = null])
array _escapeTrace (array $Trace)
string _escapeTraceFile (string $File)
string _standardizePath (string $Path)
array __sleep ()
Variables
boolean $enabled = true (line 386)

Flag to enable/disable logging

mixed $json_objectStack = array() (line 1229)

Keep a list of objects as we descend into the array so we can detect recursion.

int $messageIndex = 1 (line 355)

Wildfire protocol message index

array $objectFilters = array() (line 372)

Filters used to exclude object members when encoding

object $objectStack = array() (line 379)

A stack of objects used to detect recursion during object encoding

array $options = array('maxObjectDepth' => 10,
'maxArrayDepth' => 20,
'useNativeJsonEncode' => true,
'includeLineNumbers' => true)
(line 362)

Options for the library

Methods
Constructor FirePHP (line 391)

The object constructor

FirePHP FirePHP ()
assertionHandler (line 539)

FirePHP's assertion handler

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

void assertionHandler (string $file, int $line, mixed $code)
  • string $file: File source of assertion
  • int $line: Line source of assertion
  • mixed $code: Assertion code
detectClientExtension (line 699)

Check if FirePHP is installed on client

boolean detectClientExtension ()
dump (line 665)

Dumps key and variable to firebug server panel

  • see: FirePHP::DUMP
  • throws: Exception
true dump (string $Key, mixed $Variable)
  • string $Key
  • mixed $Variable
encodeObject (line 1052)

Encodes an object

  • return: All members of the object
array encodeObject (Object $Object, [ $ObjectDepth = 1], [ $ArrayDepth = 1], int $Depth)
  • Object $Object: The object to be encoded
  • int $Depth: The current traversal depth
  • $ObjectDepth
  • $ArrayDepth
encodeTable (line 1024)

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

array encodeTable (array $Table)
  • array $Table: The table to be encoded
error (line 652)

Log object with label to firebug console

  • see: FirePHP::ERROR
  • throws: Exception
true error (mixes $Object, [string $Label = null])
  • mixes $Object
  • string $Label
errorHandler (line 505)

FirePHP's error handler

Logs each php error that will occur.

void errorHandler (int $errno, string $errstr, string $errfile, int $errline, array $errcontext)
  • int $errno
  • string $errstr
  • string $errfile
  • int $errline
  • array $errcontext
fb (line 716)

Log varible to Firebug

true fb (mixed $Object)
  • mixed $Object: The variable to be logged
getEnabled (line 435)

Check if logging is enabled

  • return: TRUE if enabled
boolean getEnabled ()
getInstance (line 410)

Gets singleton instance of FirePHP

FirePHP &getInstance ([boolean $AutoCreate = false])
  • boolean $AutoCreate
getOptions (line 473)

Get options from the library

  • return: The currently set options
array getOptions ()
getUserAgent (line 990)

Get user agent

string|false getUserAgent ()
group (line 576)

Start a group for following messages.

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

  • throws: Exception
true group (string $Name, [array $Options = null])
  • string $Name
  • array $Options: OPTIONAL Instructions on how to log the group
groupEnd (line 600)

Ends a group you have started before

  • throws: Exception
true groupEnd ()
info (line 626)

Log object with label to firebug console

  • see: FirePHP::INFO
  • throws: Exception
true info (mixes $Object, [string $Label = null])
  • mixes $Object
  • string $Label
is_utf8 (line 1143)

Returns true if $string is valid UTF-8 and false otherwise.

boolean is_utf8 (mixed $str)
  • mixed $str: String to be tested
jsonEncode (line 1003)

Encode an object into a JSON string

Uses PHP's jeson_encode() if available

  • return: The JSON string
string jsonEncode (object $Object, [ $skipObjectEncode = false])
  • object $Object: The object to be encoded
  • $skipObjectEncode
json_encode (line 1287)

encodes an arbitrary variable into JSON format

  • return: JSON string representation of input var or an error if a problem occurs
  • access: public
mixed json_encode (mixed $var)
  • mixed $var: any number, boolean, string, array, or object to be encoded. see argument 1 to Services_JSON() above for array-parsing behavior. if var is a strng, note that encode() always expects it to be in ASCII or UTF-8 format!
log (line 613)

Log object with label to firebug console

  • see: FirePHP::LOG
  • throws: Exception
true log (mixes $Object, [string $Label = null])
  • mixes $Object
  • string $Label
registerAssertionHandler (line 525)

Register FirePHP driver as your assert callback

  • return: Returns the original setting
mixed registerAssertionHandler ()
registerErrorHandler (line 484)

Register FirePHP as your error handler

Will use FirePHP to log each php error.

  • return: Returns a string containing the previously defined error handler (if any)
mixed registerErrorHandler ()
setEnabled (line 426)

Enable and disable logging to Firebug

void setEnabled (boolean $Enabled)
  • boolean $Enabled: TRUE to enable, FALSE to disable
setHeader (line 981)

Send header

void setHeader (string $Name, string_type $Value)
  • string $Name
  • string_type $Value
setObjectFilter (line 448)

Specify a filter to be used when encoding an object

Filters are used to exclude object members.

void setObjectFilter (string $Class, array $Filter)
  • string $Class: The class name of the object
  • array $Filter: An array of members to exclude
setOptions (line 464)

Set some options for the library

Options:

  • maxObjectDepth: The maximum depth to traverse objects (default: 10)
  • maxArrayDepth: The maximum depth to traverse arrays (default: 20)
  • useNativeJsonEncode: If true will use json_encode() (default: true)
  • includeLineNumbers: If true will include line numbers and filenames (default: true)

void setOptions (array $Options)
  • array $Options: The options to be set
setProcessorUrl (line 549)

Set custom processor url for FirePHP

void setProcessorUrl (string $URL)
  • string $URL
setRendererUrl (line 559)

Set custom renderer url for FirePHP

void setRendererUrl (string $URL)
  • string $URL
table (line 690)

Log a table in the firebug console

  • see: FirePHP::TABLE
  • throws: Exception
true table (string $Label, string $Table)
  • string $Label
  • string $Table
trace (line 677)

Log a trace in the firebug console

  • see: FirePHP::TRACE
  • throws: Exception
true trace (string $Label)
  • string $Label
warn (line 639)

Log object with label to firebug console

  • see: FirePHP::WARN
  • throws: Exception
true warn (mixes $Object, [string $Label = null])
  • mixes $Object
  • string $Label
_escapeTrace (line 944)

Escape trace path for windows systems

array _escapeTrace (array $Trace)
  • array $Trace
_escapeTraceFile (line 963)

Escape file information of trace for windows systems

string _escapeTraceFile (string $File)
  • string $File
_standardizePath (line 934)

Standardizes path for windows systems.

string _standardizePath (string $Path)
  • string $Path
__sleep (line 400)

When the object gets serialized only include specific object members.

array __sleep ()

Documentation generated on Sun, 02 Jan 2011 23:14:38 +0000 by phpDocumentor 1.4.3