ICanBoogie/ICanBoogie 3.0.x
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Autoconfig
    • Binding
    • Core
    • Routing
    • Session

Classes

  • AlreadyAuthenticated
  • Core
  • Debug
  • Helpers
  • Hooks
  • Logger
  • LogLevel
  • SessionWithEvent

Interfaces

  • LoggerInterface

Traits

  • AppAccessor
  • LoggerTrait

Exceptions

  • CoreAlreadyBooted
  • CoreAlreadyInstantiated
  • CoreAlreadyRunning
  • CoreNotInstantiated

Constants

  • TOKEN_ALPHA
  • TOKEN_ALPHA_UPCASE
  • TOKEN_NUMERIC
  • TOKEN_SYMBOL
  • TOKEN_SYMBOL_WIDE

Functions

  • app
  • boot
  • excerpt
  • generate_token
  • generate_token_wide
  • get_autoconfig
  • log
  • log_error
  • log_info
  • log_success
  • log_time
  • resolve_app_paths
  • resolve_instance_name
  • strip_root

Class Debug

Namespace: ICanBoogie
Codecoverageignore
Located at Debug.php

Methods summary

public static
# synthesize_config( array $fragments )
public static
# is_dev( )
public static
# is_stage( )
public static
# is_production( )
public static
# configure( array $config )

Configures the class.

Configures the class.

Parameters

$config
A config such as one returned by $app->configs['debug'].
public static
# shutdown_handler( )

Stores logged messages in the session and report fatal errors.

Stores logged messages in the session and report fatal errors.

public static
# error_handler( integer $no, string $str, string $file, integer $line, array $context )

Handles errors.

Handles errors.

The ICanBoogie\Debug::$last_error and ICanBoogie\Debug::$last_error_message properties are updated.

The alert is formatted, reported and if the verbose option is true the alert is displayed.

Parameters

$no
The level of the error raised.
$str
The error message.
$file
The filename that the error was raised in.
$line
The line number the error was raised at.
$context
The active symbol table at the point the error occurred.
public static
# exception_handler( Exception $exception )

Basic exception handler.

Basic exception handler.

Parameters

$exception
public static string
# format_alert( Exception|array $alert )

Formats an alert into a HTML element.

Formats an alert into a HTML element.

An alert can be an exception or an array representing an error triggered with the trigger_error() function.

Parameters

$alert

Returns

string
public static string
# format_trace( array $trace )

Formats a stack trace into an HTML element.

Formats a stack trace into an HTML element.

Parameters

$trace

Returns

string
public static string
# format_code_sample( string $file, integer $line = 0 )

Extracts and formats a code sample around the line that triggered the alert.

Extracts and formats a code sample around the line that triggered the alert.

Parameters

$file
$line

Returns

string
public static
# report( string $message )

Reports the alert to the admin of the website.

Reports the alert to the admin of the website.

The method sends an email to the admin of the website defined whose email address is defined in the debug config using the "report_address" key.

Parameters

$message
public static string[]
# get_messages( $level )

The method is forwarded to the core's logger get_messages() method.

The method is forwarded to the core's logger get_messages() method.

Parameters

$level

Returns

string[]
public static string[]
# fetch_messages( $level )

The method is forwarded to the core's logger fetch_messages() method.

The method is forwarded to the core's logger fetch_messages() method.

Parameters

$level

Returns

string[]

Constants summary

string MODE_DEV
# 'dev'
string MODE_STAGE
# 'stage'
string MODE_PRODUCTION
# 'production'
integer MAX_STRING_LEN
# 16

Properties summary

public static string $mode
# 'dev'
public static array[string]mixed $last_error

Last error.

Last error.

#
public static string $last_error_message

Last error message.

Last error message.

#
ICanBoogie/ICanBoogie 3.0.x API documentation generated by ApiGen