Skip to content

Commit

Permalink
Expanding documentation for Debugger.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 28, 2010
1 parent bb941c2 commit 6c51573
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions cake/libs/debugger.php
Expand Up @@ -207,7 +207,7 @@ function &getInstance($class = null) {
* *
* @param $var mixed the variable to dump * @param $var mixed the variable to dump
* @return void * @return void
* @see exportVar * @see Debugger::exportVar()
* @access public * @access public
* @static * @static
* @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class * @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class
Expand All @@ -218,8 +218,8 @@ function dump($var) {
} }


/** /**
* Creates a detailed stack trace log at the time of invocation, much like dump() * Creates an entry in the log file. The log entry will contain a stack trace from where it was called.
* but to debug.log. * as well as export the variable using exportVar. By default the log is written to the debug log.
* *
* @param $var mixed Variable or content to log * @param $var mixed Variable or content to log
* @param $level int type of log to use. Defaults to LOG_DEBUG * @param $level int type of log to use. Defaults to LOG_DEBUG
Expand Down Expand Up @@ -320,8 +320,17 @@ function handleError($code, $description, $file = null, $line = null, $context =
/** /**
* Outputs a stack trace based on the supplied options. * Outputs a stack trace based on the supplied options.
* *
* ### Options
*
* - `depth` - The number of stack frames to return. Defaults to 999
* - `format` - The format you want the return. Defaults to the currently selected format. If
* format is 'array' or 'points' the return will be an array.
* - `args` - Should arguments for functions be shown? If true, the arguments for each method call
* will be displayed.
* - `start` - The stack frame to start generating a trace from. Defaults to 0
*
* @param array $options Format for outputting stack trace * @param array $options Format for outputting stack trace
* @return string Formatted stack trace * @return mixed Formatted stack trace
* @access public * @access public
* @static * @static
* @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class * @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class
Expand Down Expand Up @@ -523,7 +532,7 @@ function exportVar($var, $recursion = 0) {
* @param string $var Object to convert * @param string $var Object to convert
* @return string * @return string
* @access private * @access private
* @see Debugger:exportVar() * @see Debugger::exportVar()
*/ */
function __object($var) { function __object($var) {
$out = array(); $out = array();
Expand Down Expand Up @@ -552,7 +561,8 @@ function __object($var) {
* Switches output format, updates format strings * Switches output format, updates format strings
* *
* @param string $format Format to use, including 'js' for JavaScript-enhanced HTML, 'html' for * @param string $format Format to use, including 'js' for JavaScript-enhanced HTML, 'html' for
* straight HTML output, or 'text' for unformatted text. * straight HTML output, or 'txt' for unformatted text.
* @param array $strings Template strings to be used for the output format.
* @access protected * @access protected
*/ */
function output($format = null, $strings = array()) { function output($format = null, $strings = array()) {
Expand Down

0 comments on commit 6c51573

Please sign in to comment.