Methods summary
public static
|
#
Init( boolean $forceDevelopmentMode = NULL )
Initialize debugging and logging, once only.
Initialize debugging and logging, once only.
Parameters
- $forceDevelopmentMode
If defined as TRUE or FALSE ,
debugging mode will be set not
by config but by this value.
|
public static
boolean|null
|
#
SetStrictExceptionsMode( boolean $strictExceptionsMode, array $errorLevelsToExceptions = [] )
Configure strict exceptions mode, mode is enabled by default.
If mode is configured to FALSE and any previous error handler exists,
it's automatically assigned back, else there is only called
restore_error_handler() to restore system error handler.
Configure strict exceptions mode, mode is enabled by default.
If mode is configured to FALSE and any previous error handler exists,
it's automatically assigned back, else there is only called
restore_error_handler() to restore system error handler.
Parameters
- $strictExceptionsMode
- $errorLevelsToExceptions
- E_ERROR, E_RECOVERABLE_ERROR, E_CORE_ERROR, E_USER_ERROR, E_WARNING, E_CORE_WARNING, E_USER_WARNING
Returns
boolean|null
|
public static
float
|
#
Timer( string $name = NULL )
Starts/stops stopwatch.
Parameters
Returns
float Elapsed seconds.
|
public static
mixed
|
#
Dump( mixed $value, boolean $return = FALSE, boolean $exit = FALSE )
Dumps information about any variable in readable format and return it.
In non-development mode - store dumped variable in debug.log .
Dumps information about any variable in readable format and return it.
In non-development mode - store dumped variable in debug.log .
Parameters
- $value
- Variable to dump.
- $return
- Return output instead of printing it.
- $exit
TRUE for last dump call by xxx(); method to
dump and exit; .
Returns
mixed Variable itself or dumped variable string.
|
public static
mixed
|
#
BarDump( mixed $value, string $title = NULL, array $options = [] )
Dump any variable with output buffering in browser debug bar.
In non-development mode - store dumped variable in debug.log .
Return printed variable as string.
Dump any variable with output buffering in browser debug bar.
In non-development mode - store dumped variable in debug.log .
Return printed variable as string.
Parameters
- $value
- Variable to dump.
- $title
- Optional title.
- $options
- Dumper options.
Returns
mixed Variable itself.
|
public static
string
|
#
Log( mixed|Exception|Throwable $value, string $priority = \MvcCore\IDebug::INFO )
Logs any message or exception with log date time, in *.log file
by given log level, in configured logging directory.
Logs any message or exception with log date time, in *.log file
by given log level, in configured logging directory.
Parameters
Returns
string Logging filename full path.
|
public static
|
#
Exception( Exception|Error|Throwable |array $exception, boolean $exit = TRUE )
Print caught exception in browser.
In non-development mode - store dumped exception in exception.log .
Print caught exception in browser.
In non-development mode - store dumped exception in exception.log .
Parameters
|
public static
|
#
ShutdownHandler( )
Print all stored dumps at the end of sent response body as browser debug
bar. This function is called from registered shutdown handler by
register_shutdown_function() from \MvcCore\Debug::initHandlers(); .
Print all stored dumps at the end of sent response body as browser debug
bar. This function is called from registered shutdown handler by
register_shutdown_function() from \MvcCore\Debug::initHandlers(); .
|