Debugger Class Reference

Inheritance diagram for Debugger:

Object

List of all members.


Public Member Functions

 checkSessionKey ()
 dump ($var)
 excerpt ($file, $line, $context=2)
 exportVar ($var, $recursion=0)
getInstance ()
 handleError ($code, $description, $file=null, $line=null, $context=null)
 invoke (&$debugger)
 log ($var, $level=LOG_DEBUG)
 output ($format= 'js')
 trace ($options=array())
 trimPath ($path)

Public Attributes

 $errors = array()
 $helpPath = null

Detailed Description

Definition at line 47 of file debugger.php.


Member Function Documentation

Debugger::checkSessionKey (  ) 

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

public

Definition at line 520 of file debugger.php.

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

Referenced by AuthComponent::initialize().

Debugger::dump ( var  ) 

formats and outputs the passed var

Definition at line 111 of file debugger.php.

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

Debugger::excerpt ( file,
line,
context = 2 
)

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

Definition at line 321 of file debugger.php.

References $file.

Debugger::exportVar ( var,
recursion = 0 
)

Converts a variable to a string for debug output

Parameters:
string $var Variable to convert
Returns:
string Variable as a formatted string public

Definition at line 348 of file debugger.php.

References $out, getInstance(), and ife().

Referenced by dump(), log(), ConsoleShell::main(), trace(), and CakeSession::write().

& Debugger::getInstance (  ) 

Gets a reference to the Debugger object instance

Returns:
object public

Definition at line 96 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 142 of file debugger.php.

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

Referenced by invoke().

Debugger::invoke ( &$  debugger  ) 

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

Definition at line 532 of file debugger.php.

References handleError().

Debugger::log ( var,
level = LOG_DEBUG 
)

neatly logs a given var

Reimplemented from Object.

Definition at line 118 of file debugger.php.

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

Referenced by handleError().

Debugger::output ( format = 'js'  ) 

Handles object conversion to debug string

Parameters:
string $var Object to convert protected

Definition at line 427 of file debugger.php.

References getInstance().

Debugger::trace ( options = array()  ) 

Outputs a stack trace with the given options

Parameters:
array $options Format for outputting stack trace
Returns:
string Formatted stack trace public

Definition at line 217 of file debugger.php.

References exportVar(), and trimPath().

Debugger::trimPath ( path  ) 

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 292 of file debugger.php.

References Configure::corePaths().

Referenced by trace().


Member Data Documentation

Debugger::$errors = array()

Definition at line 55 of file debugger.php.

Debugger::$helpPath = null

Definition at line 62 of file debugger.php.


The documentation for this class was generated from the following file: