Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NArrayTools
  • NCallback
  • NComponent
  • NComponentContainer
  • NConfigurator
  • NDateTime53
  • NDebug
  • NEnvironment
  • NFramework
  • NFreezableObject
  • NGenericRecursiveIterator
  • NImage
  • NImageMagick
  • NInstanceFilterIterator
  • NObject
  • NObjectMixin
  • NPaginator
  • NRecursiveComponentIterator
  • NServiceLocator
  • NSmartCachingIterator
  • NString
  • NTools

Interfaces

  • IComponent
  • IComponentContainer
  • IDebuggable
  • IServiceLocator
  • ITranslator

Exceptions

  • NAmbiguousServiceException
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

Class NDebug

Debug static class.

Final
Package: Nette
Author: David Grudl
Located at Debug/Debug.php
Methods summary
final public
# __construct( )

Static class - cannot be instantiated.

Static class - cannot be instantiated.

public static mixed
# dump( mixed $var, boolean $return = FALSE )

Dumps information about a variable in readable format.

Dumps information about a variable in readable format.

Parameters

$var
mixed
variable to dump
$return
boolean
return output instead of printing it? (bypasses $productionMode)

Returns

mixed
variable itself or dump
public static mixed
# consoleDump( mixed $var, string $title = NULL )

Dumps information about a variable in Nette Debug Console.

Dumps information about a variable in Nette Debug Console.

Parameters

$var
mixed
variable to dump
$title
string
optional title

Returns

mixed
variable itself
public static elapsed
# timer( string $name = NULL )

Starts/stops stopwatch.

Starts/stops stopwatch.

Parameters

$name
string
name

Returns

elapsed
seconds
public static
# enable( mixed $mode = NULL, string $logFile = NULL, array|string $email = NULL )

Enables displaying or logging errors and exceptions.

Enables displaying or logging errors and exceptions.

Parameters

$mode
mixed
production, development mode, autodetection or IP address(es).
$logFile
string
error log file (FALSE disables logging in production mode)
$email
array|string
administrator email or email headers; enables email sending in production mode
public static boolean
# isEnabled( )

Is Debug enabled?

Is Debug enabled?

Returns

boolean
public static
# processException( Exception $exception, boolean $outputAllowed = FALSE )

Logs or displays exception.

Logs or displays exception.

Parameters

$exception
Exception
$outputAllowed
boolean
is writing to standard output buffer allowed?
public static
# toStringException( Exception $exception )

Handles exception throwed in __toString().

Handles exception throwed in __toString().

Parameters

$exception
Exception
public static
# enableProfiler( )

Enables profiler.

Enables profiler.

public static
# disableProfiler( )

Disables profiler.

Disables profiler.

public static
# addColophon( callback $callback )

Add custom descriptions.

Add custom descriptions.

Parameters

$callback
callback
public static mixed
# fireDump( mixed $var, string $key )

Sends variable dump to Firebug tab request/server.

Sends variable dump to Firebug tab request/server.

Parameters

$var
mixed
variable to dump
$key
string
unique key

Returns

mixed
variable itself
public static boolean
# fireLog( mixed $message, string $priority = NDebug::LOG, string $label = NULL )

Sends message to Firebug console.

Sends message to Firebug console.

Parameters

$message
mixed
message to log
$priority
string
priority of message (LOG, INFO, WARN, ERROR, GROUP_START, GROUP_END)
$label
string
optional label

Returns

boolean
was successful?
Constants summary
boolean DEVELOPMENT FALSE
#

server modes NDebug::enable()

server modes NDebug::enable()

boolean PRODUCTION TRUE
#
DETECT NULL
#
string LOG 'LOG'
#

FirePHP log priority

FirePHP log priority

string INFO 'INFO'
#
string WARN 'WARN'
#
string ERROR 'ERROR'
#
string TRACE 'TRACE'
#
string EXCEPTION 'EXCEPTION'
#
string GROUP_START 'GROUP_START'
#
string GROUP_END 'GROUP_END'
#
Properties summary
public static boolean $productionMode
#

determines whether a server is running in production mode

determines whether a server is running in production mode

public static boolean $consoleMode
#

determines whether a server is running in console mode

determines whether a server is running in console mode

public static integer $time
#
public static integer $maxDepth 3
#

how many nested levels of array/object properties display NDebug::dump()

how many nested levels of array/object properties display NDebug::dump()

public static integer $maxLen 150
#

how long strings display NDebug::dump()

how long strings display NDebug::dump()

public static integer $showLocation FALSE
#

display location? NDebug::dump()

display location? NDebug::dump()

public static boolean $strictMode FALSE
#

determines whether to consider all errors as fatal

determines whether to consider all errors as fatal

public static array $onFatalError array()
#

of callbacks specifies the functions that are automatically called after fatal error

of callbacks specifies the functions that are automatically called after fatal error

public static callback $mailer array(__CLASS__, 'defaultMailer')
#
public static integer $emailSnooze 172800
#

interval for sending email is 2 days

interval for sending email is 2 days

public static array $counters array()
#

free counters for your usage

free counters for your usage

Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0