class Backtrace (View source)

Backtrace helper

Traits

Provides extensions to this object to integrate it with standard config API methods.

Config options

ignore_function_args array

Replaces all arguments with a '' string, mostly for security reasons. Use string values for global functions, and array notation for class methods.

Properties

Methods

public static 
config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

public
mixed
stat(string $name) deprecated

Get inherited config value

public
mixed
uninherited(string $name)

Gets the uninherited value for the given config option

public
$this
set_stat(string $name, mixed $value) deprecated

Update the config value for a given property

public static 
array
filtered_backtrace(null|array $ignoredFunctions = null)

Return debug_backtrace() results with functions filtered specific to the debugging system, and not the trace.

public static 
array
filter_backtrace(array $bt, null|array $ignoredFunctions = null)

Filter a backtrace so that it doesn't show the calls to the debugging system, which is useless information.

public static 
mixed
backtrace(mixed $returnVal = false, bool $ignoreAjax = false, array $ignoredFunctions = null)

Render or return a backtrace from the given scope.

public static 
string
full_func_name(object $item, bool $showArgs = false, int $argCharLimit = 10000)

Return the full function name. If showArgs is set to true, a string representation of the arguments will be shown

public static 
string
get_rendered_backtrace(array $bt, bool $plainText = false, array $ignoredFunctions = null)

Render a backtrace array into an appropriate plain-text or HTML string.

Details

static Config_ForClass config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

Return Value

Config_ForClass

mixed stat(string $name) deprecated

deprecated 5.0 Use ->config()->get() instead

Get inherited config value

Parameters

string $name

Return Value

mixed

mixed uninherited(string $name)

Gets the uninherited value for the given config option

Parameters

string $name

Return Value

mixed

$this set_stat(string $name, mixed $value) deprecated

deprecated 5.0 Use ->config()->set() instead

Update the config value for a given property

Parameters

string $name
mixed $value

Return Value

$this

static array filtered_backtrace(null|array $ignoredFunctions = null)

Return debug_backtrace() results with functions filtered specific to the debugging system, and not the trace.

Parameters

null|array $ignoredFunctions

If an array, filter these functions out of the trace

Return Value

array

static array filter_backtrace(array $bt, null|array $ignoredFunctions = null)

Filter a backtrace so that it doesn't show the calls to the debugging system, which is useless information.

Parameters

array $bt

Backtrace to filter

null|array $ignoredFunctions

List of extra functions to filter out

Return Value

array

static mixed backtrace(mixed $returnVal = false, bool $ignoreAjax = false, array $ignoredFunctions = null)

Render or return a backtrace from the given scope.

Parameters

mixed $returnVal
bool $ignoreAjax
array $ignoredFunctions

Return Value

mixed

static string full_func_name(object $item, bool $showArgs = false, int $argCharLimit = 10000)

Return the full function name. If showArgs is set to true, a string representation of the arguments will be shown

Parameters

object $item
bool $showArgs
int $argCharLimit

Return Value

string

static string get_rendered_backtrace(array $bt, bool $plainText = false, array $ignoredFunctions = null)

Render a backtrace array into an appropriate plain-text or HTML string.

Parameters

array $bt

The trace array, as returned by debug_backtrace() or Exception::getTrace()

bool $plainText

Set to false for HTML output, or true for plain-text output

array $ignoredFunctions

List of functions that should be ignored. If not set, a default is provided

Return Value

string

The rendered backtrace