Debugger Class Reference

Inheritance diagram for Debugger:

Object List of all members.

Public Member Functions

 __construct ()
 __object ($var)
 _output ($level, $error, $code, $helpCode, $description, $file, $line, $kontext)
 handleError ($code, $description, $file=null, $line=null, $context=null)
 output ($format= 'js')

Static Public Member Functions

 checkSessionKey ()
 dump ($var)
 excerpt ($file, $line, $context=2)
 exportVar ($var, $recursion=0)
getInstance ($class=null)
 invoke (&$debugger)
 log ($var, $level=LOG_DEBUG)
 trace ($options=array())
 trimPath ($path)

Public Attributes

 $__data = array()
 $_outputFormat = 'js'
 $errors = array()
 $helpPath = null

Detailed Description

Definition at line 46 of file debugger.php.


Constructor & Destructor Documentation

Debugger::__construct (  ) 

Constructor.

Reimplemented from Object.

Definition at line 79 of file debugger.php.


Member Function Documentation

Debugger::__object ( var  ) 

Handles object to string conversion.

Parameters:
string $var Object to convert
Returns:
string private
See also:
Debugger:exportVar()

Definition at line 435 of file debugger.php.

References $out, and exportVar().

Debugger::_output ( level,
error,
code,
helpCode,
description,
file,
line,
kontext 
)

Handles object conversion to debug string.

Parameters:
string $var Object to convert private

Definition at line 482 of file debugger.php.

References $out, debug(), error(), excerpt(), exportVar(), log(), pr(), Configure::read(), start(), and trace().

Debugger::checkSessionKey (  )  [static]

Verifies that the application's salt value has been changed from the default value.

public

Definition at line 555 of file debugger.php.

References __(), a(), config(), and Configure::read().

Referenced by AuthComponent::initialize().

Debugger::dump ( var  )  [static]

Formats and outputs the contents of the supplied variable.

Parameters:
$var mixed the variable to dump
Returns:
void
See also:
exportVar public
http://book.cakephp.org/view/460/Using-the-Debugger-Class

Definition at line 126 of file debugger.php.

References exportVar(), getInstance(), and pr().

Debugger::excerpt ( file,
line,
context = 2 
) [static]

Grabs an excerpt from a file and highlights a given line of code

Parameters:
string $file Absolute path to a PHP file
integer $line Line number to highlight
integer $context Number of lines of context to extract above and below $line
Returns:
array Set of lines highlighted public
http://book.cakephp.org/view/460/Using-the-Debugger-Class

Definition at line 350 of file debugger.php.

Referenced by _output().

Debugger::exportVar ( var,
recursion = 0 
) [static]

Converts a variable to a string for debug output.

Parameters:
string $var Variable to convert
Returns:
string Variable as a formatted string public
http://book.cakephp.org/view/460/Using-the-Debugger-Class

Definition at line 382 of file debugger.php.

References $out, and getInstance().

Referenced by __object(), _output(), dump(), log(), trace(), and write().

& Debugger::getInstance ( class = null  )  [static]

Returns a reference to the Debugger singleton object instance.

Returns:
object public

Definition at line 95 of file debugger.php.

References Configure::read(), and Configure::version().

Referenced by dump(), exportVar(), handleError(), log(), and output().

Debugger::handleError ( code,
description,
file = null,
line = null,
context = null 
)

Overrides PHP's default error handling.

Parameters:
integer $code Code of error
string $description Error description
string $file File on which error occurred
integer $line Line that triggered the error
array $context Context
Returns:
boolean true if error was handled public

Definition at line 165 of file debugger.php.

References getInstance(), log(), Configure::read(), and CakeLog::write().

Referenced by invoke().

Debugger::invoke ( &$  debugger  )  [static]

Invokes the given debugger object as the current error handler, taking over control from the previous handler in a stack-like hierarchy.

Parameters:
object $debugger A reference to the Debugger object public
http://book.cakephp.org/view/460/Using-the-Debugger-Class

Definition at line 569 of file debugger.php.

References handleError().

Debugger::log ( var,
level = LOG_DEBUG 
) [static]

Creates a detailed stack trace log at the time of invocation, much like dump() but to debug.log.

Parameters:
$var mixed Variable or content to log
$level int type of log to use. Defaults to LOG_DEBUG
Returns:
void
http://book.cakephp.org/view/460/Using-the-Debugger-Class

Reimplemented from Object.

Definition at line 140 of file debugger.php.

References exportVar(), getInstance(), start(), and CakeLog::write().

Referenced by _output(), and handleError().

Debugger::output ( format = 'js'  ) 

Handles object conversion to debug string.

Parameters:
string $var Object to convert protected

Definition at line 463 of file debugger.php.

References getInstance().

Debugger::trace ( options = array()  )  [static]

Outputs a stack trace based on the supplied options.

Parameters:
array $options Format for outputting stack trace
Returns:
string Formatted stack trace public
http://book.cakephp.org/view/460/Using-the-Debugger-Class

Definition at line 242 of file debugger.php.

References exportVar(), start(), and trimPath().

Referenced by _output().

Debugger::trimPath ( path  )  [static]

Shortens file paths by replacing the application base path with 'APP', and the CakePHP core path with 'CORE'.

Parameters:
string $path Path to shorten
Returns:
string Normalized path public

Definition at line 319 of file debugger.php.

References $path, and Configure::corePaths().

Referenced by trace().


Member Data Documentation

Debugger::$__data = array()

Definition at line 74 of file debugger.php.

Debugger::$_outputFormat = 'js'

Definition at line 67 of file debugger.php.

Debugger::$errors = array()

Definition at line 53 of file debugger.php.

Debugger::$helpPath = null

Definition at line 60 of file debugger.php.


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 00:30:56 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7