Overview

Namespaces

  • MvcCore
    • Ext
      • Auth
        • Virtual
      • Debug
        • Tracy
      • Form
        • Core
        • Validators
      • Request
      • Router
        • Lang
      • View
        • Helpers
  • None

Classes

  • Config
  • Controller
  • Debug
  • Model
  • Request
  • Response
  • Route
  • Router
  • Session
  • Tool
  • View
  • Overview
  • Namespace
  • Class
  • Tree

Class Debug

Core debug tools - printing any value by var_dump(); in fixed bar at browser window right bottom border - timing printing - debuging shortcut functions initialization - exceptions hdd logging or printing in development mode

Direct known subclasses

MvcCore\Ext\Debug\Tracy
Namespace: MvcCore
Located at mvccore/src/MvcCore/Debug.php
Methods summary
public static
# Init( )

Initialize debuging and loging.

Initialize debuging and loging.

protected static
# initHandlers( )

Initialize debuging and loging handlers.

Initialize debuging and loging handlers.

protected static
# initLogDirectory( string $logDirectory )

If log directory doesn't exist, create new directory - relative from app root.

If log directory doesn't exist, create new directory - relative from app root.

Parameters

$logDirectory
relative path from app root
public static float
# Timer( string $name = NULL )

Starts/stops stopwatch.

Starts/stops stopwatch.

Parameters

$name
time pointer name

Returns

float
elapsed seconds
public static mixed
# Dump( mixed $value, boolean $return = FALSE )

Dumps information about a variable in readable format.

Dumps information about a variable in readable format.

Parameters

$value
variable to dump
$return
return output instead of printing it? (bypasses $productionMode)

Returns

mixed
variable itself or dump

Tracyskiplocation

public static mixed
# BarDump( mixed $value, string $title = NULL, array $options = array() )

Dumps information about a variable in Tracy Debug Bar.

Dumps information about a variable in Tracy Debug Bar.

Parameters

$value
variable to dump
$title
optional title
$options
dumper options

Returns

mixed
variable itself

Tracyskiplocation

public static string
# Log( string|Exception $value, string $priority = self::INFO )

Logs message or exception.

Logs message or exception.

Parameters

$value
$priority

Returns

string
logged error filename
public static boolean
# FireLog( mixed $message, string $priority = self::DEBUG )

Sends message to FireLogger console.

Sends message to FireLogger console.

Parameters

$message
message to log
$priority
priority

Returns

boolean
was successful?
public static
# Exception( Exception|Throwable $exception, $exit = TRUE )

Handler to catch uncaught exception.

Handler to catch uncaught exception.

Parameters

$exception
$exit
public static
# ShutdownHandler( )

Print all catched dumps at the end of sended response body.

Print all catched dumps at the end of sended response body.

protected static float
# timerHandler( string $name = NULL )

Starts/stops stopwatch.

Starts/stops stopwatch.

Parameters

$name
name

Returns

float
elapsed seconds
protected static string
# dumpHandler( mixed $var, string $title = NULL, array $options = array() )

Dump any variable into string throw output buffering, store result for printing later. Return printed variable string.

Dump any variable into string throw output buffering, store result for printing later. Return printed variable string.

Parameters

$var
$title
$options

Returns

string
protected static
# exceptionHandler( MvcCore\Debug::Exception() $e, $exit = TRUE )

Exception printing for development, logging for production.

Exception printing for development, logging for production.

Parameters

$e
$exit
Constants summary
string DEBUG
# 'debug'
string INFO
# 'info'
string WARNING
# 'warning'
string ERROR
# 'error'
string EXCEPTION
# 'exception'
string CRITICAL
# 'critical'
string JAVASCRIPT
# 'javascript'
Properties summary
public static string $EmailRecepient

Email recepient to send information about exceptions or errors. 'admin@localhost' by default.

Email recepient to send information about exceptions or errors. 'admin@localhost' by default.

# 'admin@localhost'
public static mixed $LogDirectory

Relative path from app root to store any log information. '/Var/Logs' by default.

Relative path from app root to store any log information. '/Var/Logs' by default.

# '/Var/Logs'
protected static boolean $development

Semaphore to execute Init(); method only one time. TRUE if development, FALSE if anything else

Semaphore to execute Init(); method only one time. TRUE if development, FALSE if anything else

# NULL
protected static array $handlers

Debuging and loging handlers, this shoud be customized in extended class.

Debuging and loging handlers, this shoud be customized in extended class.

# array( 'timer' => 'timerHandler', 'dump' => 'dumpHandler', 'barDump' => 'dumpHandler', 'log' => 'dumpHandler', 'fireLog' => 'dumpHandler', 'exceptionHandler' => 'exceptionHandler', 'shutdownHandler' => 'ShutdownHandler', )
protected static array $dumps

Store for printed dumps by output buffering to send it at response end.

Store for printed dumps by output buffering to send it at response end.

# array()
protected static array $timers

Store timers start points.

Store timers start points.

# array()
protected static boolean $originalDebugClass

True for cofigured debug class as \MvcCore\Debug, FALSE for any other configured extension

True for cofigured debug class as \MvcCore\Debug, FALSE for any other configured extension

# TRUE
public static callable $InitGlobalShortHands

Initialize global development shorthands.

Initialize global development shorthands.

Param

string $logDirectory relative path from app root
# array()
MvcCore API documentation generated by ApiGen