PHP Class lithium\analysis\Debugger

Datei anzeigen Open project: unionofrad/lithium Class Usage Examples

Protected Properties

Property Type Description
$_closureCache array Used for temporary closure caching.

Public Methods

Method Description
export ( mixed $var ) : string Returns a parseable string representation of a variable.
trace ( array $options = [] ) : string | array | null Outputs a stack trace based on the supplied options.

Protected Methods

Method Description
_closureDef ( array $frame, callable | string $function ) : string Helper method for caching closure function references to help the process of building the stack trace.
_definition ( mixed $reference, integer $callLine ) : mixed Locates original location of closures.

Method Details

_closureDef() protected static method

Helper method for caching closure function references to help the process of building the stack trace.
protected static _closureDef ( array $frame, callable | string $function ) : string
$frame array Backtrace information.
$function callable | string The method related to $frame information.
return string Returns either the cached or the fetched closure function reference while writing its reference to the cache array `$_closureCache`.

_definition() protected static method

Locates original location of closures.
protected static _definition ( mixed $reference, integer $callLine ) : mixed
$reference mixed File or class name to inspect.
$callLine integer Line number of class reference.
return mixed Returns the line number where the method called is defined.

export() public static method

Returns a parseable string representation of a variable.
public static export ( mixed $var ) : string
$var mixed The variable to export.
return string The exported contents.

trace() public static method

Outputs a stack trace based on the supplied options.
public static trace ( array $options = [] ) : string | array | null
$options array Format for outputting stack trace. Available options are: - `'args'`: A boolean indicating if arguments should be included. - `'depth'`: The maximum depth of the trace. - `'format'`: Either `null`, `'points'` or `'array'`. - `'includeScope'`: A boolean indicating if items within scope should be included. - `'scope'`: Scope for items to include. - `'start'`: The depth to start with. - `'trace'`: A trace to use instead of generating one.
return string | array | null Stack trace formatted according to `'format'` option.

Property Details

$_closureCache protected_oe static_oe property

Used for temporary closure caching.
See also: lithium\analysis\Debugger::_closureDef()
protected static array $_closureCache
return array