PHPDevShell 3.1.3-Stable
PHP OOP RAD Development Framework
PHPDS_debug Class Reference
Inheritance diagram for PHPDS_debug:
PHPDS_dependant

Public Member Functions

 construct ($domain=null)
 domain ($domain=null)
 enable ($doit=null)
 isEnabled ()
 __invoke ($data, $label=null)
 dump ($data, $label= 'data')
 log ($data, $label=null)
 debug ($data)
 info ($data)
 warn ($data)
 warning ($data)
 error ($datal)
 process ($data)

Data Fields

const DEBUG = 4
const INFO = 3
const WARN = 2
const ERROR = 1
const LOG = 0

Protected Attributes

 $enabled = false
 $level = PHPDS_debug::LOG
 $domain
 $conduits = null

Detailed Description

Adds FirePHP support to PHPDevShell.

Author:
Greg

Member Function Documentation

__invoke ( data,
label = null 
)

Magic method: shortcut to log($ata)

construct ( domain = null)
Date:
20110202 (v1.1) (greg) moved to construct() instead of __cosntruct()
20110216 (v1.1.1) (greg) fixed a bug with enable
Version:
1.1.1
Parameters:
$domainthe semantic domain of the debug object (to match (or not) the filters are set in configuration)
debug ( data)

Push Firebug Debug Info

Parameters:
mixed$data
Returns:
void
domain ( domain = null)

Accessor for the domain field: get (and possibily set) the domain

The domain is the semantic field of the data sent to this instance ; it's used to filter which data will be actually sent Note: the object will enable/disabled itself based on the domain debug configuration: the domain MUST be in the array to be active.

Version:
1.1
Author:
greg
Date:
20110216 (v1.1) (greg) domain filters can now be regex
Parameters:
$domainstring (optional) the semantic domain
Returns:
string, the domain (maybe null)

$this->enabled = in_array($domain, $configuration['domains']);

dump ( data,
label = 'data' 
)

Dump the content of a variable to the backends

Parameters:
$data
$label
enable ( doit = null)

Enable or disable the debugger output ; get the current state

Note: at this time, the debugger has to be enabled at startup

Parameters:
$doit(optional) enable (true or disable (false)
Returns:
boolean weither it's currently enabled
error ( datal)

Push Firebug Error

Parameters:
mixed$data
Returns:
void
info ( data)

Push Firebug Info

Parameters:
mixed$data
Returns:
void

Reimplemented from PHPDS_dependant.

isEnabled ( )

Is this instance sending data?

Returns:
boolean
log ( data,
label = null 
)

Log the data to the backends with the LOG level (the smallest, most often seen)

Parameters:
$data
$label
process ( data)

FirePHP Process

Parameters:
mixed$data
Returns:
void
warn ( data)

Push Firebug Warning

Parameters:
mixed$data
Returns:
void
warning ( data)

Push Firebug Warning

Parameters:
mixed$data

Field Documentation

$conduits = null [protected]
$domain [protected]
$enabled = false [protected]
$level = PHPDS_debug::LOG [protected]
const DEBUG = 4
const ERROR = 1
const INFO = 3
const LOG = 0
const WARN = 2

The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Enumerations