public static mixed | #enabled(mixed$forceMode=null)Enables or disables Kint, can globally enforce the rendering mode. If called without parameters, returns the current mode. Enables or disables Kint, can globally enforce the rendering mode. If called without parameters, returns the current mode. Parameters- $forceMode
mixed $forceMode null or void - return current mode false - disable (no output) true - enable and detect cli automatically Kint::MODE_* - enable and force selected mode disregarding detection and function shorthand (s()/d()), note that you can still override this with the "~" modifier
Returnsmixed previously set value if a new one is passed
|
public static mixed | #trace(array$trace=null)Prints a debug backtrace, same as Kint::dump(1) Prints a debug backtrace, same as Kint::dump(1) Parameters- $trace
array $trace [OPTIONAL] you can pass your own trace, otherwise,debug_backtracewill be called
Returnsmixed
|
public static |string | #dump(mixed$data=null)Dump information about variables, accepts any number of parameters, supports modifiers: Dump information about variables, accepts any number of parameters, supports modifiers: clean up any output before kint and place the dump at the top of page: - Kint::dump() ***** expand all nodes on display: ! Kint::dump() ***** dump variables disregarding their depth: + Kint::dump() ***** return output instead of displaying it: @ Kint::dump() ***** force output as plain text ~ Kint::dump() Modifiers are supported by all dump wrapper functions, including Kint::trace(). Space is optional. You can also use the following shorthand to display debug_backtrace(): Kint::dump( 1 ); Passing the result from debug_backtrace() to kint::dump() as a single parameter will display it as trace too: $trace = debug_backtrace( true ); Kint::dump( $trace ); Or simply: Kint::dump( debug_backtrace() ); ParametersReturns|string
|
public static string | #shortenPath(string$file)generic path display callback, can be configured in the settings; purpose is to show relevant path info and hide as much of the path as possible. generic path display callback, can be configured in the settings; purpose is to show relevant path info and hide as much of the path as possible. ParametersReturnsstring
|
public static | |
private static boolean|string | #_showSource(string$file,integer$lineNumber,integer$padding=7)trace helper, shows the place in code inline trace helper, shows the place in code inline Parameters- $file
string $file full path to file- $lineNumber
integer $lineNumber the line to display- $padding
integer $padding surrounding lines to show besides the main one
Returnsboolean|string
|
private static array( | #_getCalleeInfo(array$trace)returns parameter names that the function was passed, as well as any predefined symbols before function call (modifiers) returns parameter names that the function was passed, as well as any predefined symbols before function call (modifiers) ParametersReturnsarray( $parameters, $modifier, $callee, $previousCaller )
|
private static string | #_removeAllButCode(string$source)removes comments and zaps whitespace & <?php tags from php code, makes for easier further parsing removes comments and zaps whitespace & <?php tags from php code, makes for easier further parsing ParametersReturnsstring
|
private static array | #_stepIsInternal(mixed$step)returns whether current trace step belongs to Kint or its wrappers returns whether current trace step belongs to Kint or its wrappers ParametersReturnsarray
|
private static | |