PHP Class Barryvdh\Debugbar\LaravelDebugbar

Rest is added in Service Provider
Inheritance: extends DebugBar\DebugBar
Afficher le fichier Open project: barryvdh/laravel-debugbar Class Usage Examples

Protected Properties

Свойство Type Description
$app Illuminate\Foundation\Application The Laravel application instance.
$booted boolean True when booted.
$enabled boolean True when enabled, false disabled an null for still unknown
$is_lumen boolean True when this is a Lumen application
$version string Normalized Laravel Version

Méthodes publiques

Méthode Description
__call ( string $method, array $args ) : mixed | void Magic calls for adding messages
__construct ( Illuminate\Contracts\Foundation\Application $app = null )
addException ( Exception $e ) Adds an exception to be profiled in the debug bar
addMeasure ( string $label, float $start, float $end ) Adds a measure
addMessage ( mixed $message, string $label = 'info' ) Adds a message to the MessagesCollector
addThrowable ( Exception $e ) Adds an exception to be profiled in the debug bar
boot ( ) Boot the debugbar (add collectors, renderer and listener)
collect ( ) : array Collects the data from the collectors
collectConsole ( ) : array Collect data in a CLI request
disable ( ) Disable the Debugbar
enable ( ) Enable the Debugbar and boot, if not already booted.
getJavascriptRenderer ( string $baseUrl = null, $basePath = null ) : JavascriptRenderer Returns a JavascriptRenderer for this instance
injectDebugbar ( Response $response ) Injects the web debug toolbar into the given Response.
isEnabled ( ) : boolean Check if the Debugbar is enabled
measure ( string $label, Closure $closure ) Utility function to measure the execution of a Closure
modifyResponse ( Request $request, Response $response ) : Response Modify the response and inject the debugbar (or data in headers)
shouldCollect ( $name, $default = false )
startMeasure ( string $name, string $label = null ) Starts a measure
stopMeasure ( string $name ) Stops a measure

Méthodes protégées

Méthode Description
addClockworkHeaders ( Response $response )
checkVersion ( string $version, string $operator = ">=" ) : boolean Check the version of Laravel
isDebugbarRequest ( ) : boolean Check if this is a request to the Debugbar OpenHandler
isJsonRequest ( Request $request ) : boolean
isLumen ( )
selectStorage ( DebugBar\DebugBar $debugbar )

Method Details

__call() public méthode

Magic calls for adding messages
public __call ( string $method, array $args ) : mixed | void
$method string
$args array
Résultat mixed | void

__construct() public méthode

public __construct ( Illuminate\Contracts\Foundation\Application $app = null )
$app Illuminate\Contracts\Foundation\Application

addClockworkHeaders() protected méthode

protected addClockworkHeaders ( Response $response )
$response Symfony\Component\HttpFoundation\Response

addException() public méthode

Adds an exception to be profiled in the debug bar
Deprecation: in favor of addThrowable
public addException ( Exception $e )
$e Exception

addMeasure() public méthode

Adds a measure
public addMeasure ( string $label, float $start, float $end )
$label string
$start float
$end float

addMessage() public méthode

A message can be anything from an object to a string
public addMessage ( mixed $message, string $label = 'info' )
$message mixed
$label string

addThrowable() public méthode

Adds an exception to be profiled in the debug bar
public addThrowable ( Exception $e )
$e Exception

boot() public méthode

Boot the debugbar (add collectors, renderer and listener)
public boot ( )

checkVersion() protected méthode

Check the version of Laravel
protected checkVersion ( string $version, string $operator = ">=" ) : boolean
$version string
$operator string (default: '>=')
Résultat boolean

collect() public méthode

Collects the data from the collectors
public collect ( ) : array
Résultat array

collectConsole() public méthode

Collect data in a CLI request
public collectConsole ( ) : array
Résultat array

disable() public méthode

Disable the Debugbar
public disable ( )

enable() public méthode

Enable the Debugbar and boot, if not already booted.
public enable ( )

getJavascriptRenderer() public méthode

Returns a JavascriptRenderer for this instance
public getJavascriptRenderer ( string $baseUrl = null, $basePath = null ) : JavascriptRenderer
$baseUrl string
Résultat JavascriptRenderer

injectDebugbar() public méthode

Injects the web debug toolbar into the given Response.
public injectDebugbar ( Response $response )
$response Symfony\Component\HttpFoundation\Response A Response instance Based on https://github.com/symfony/WebProfilerBundle/blob/master/EventListener/WebDebugToolbarListener.php

isDebugbarRequest() protected méthode

Check if this is a request to the Debugbar OpenHandler
protected isDebugbarRequest ( ) : boolean
Résultat boolean

isEnabled() public méthode

Check if the Debugbar is enabled
public isEnabled ( ) : boolean
Résultat boolean

isJsonRequest() protected méthode

protected isJsonRequest ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
Résultat boolean

isLumen() protected méthode

protected isLumen ( )

measure() public méthode

Utility function to measure the execution of a Closure
public measure ( string $label, Closure $closure )
$label string
$closure Closure

modifyResponse() public méthode

Modify the response and inject the debugbar (or data in headers)
public modifyResponse ( Request $request, Response $response ) : Response
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response
Résultat Symfony\Component\HttpFoundation\Response

selectStorage() protected méthode

protected selectStorage ( DebugBar\DebugBar $debugbar )
$debugbar DebugBar\DebugBar

shouldCollect() public méthode

public shouldCollect ( $name, $default = false )

startMeasure() public méthode

Starts a measure
public startMeasure ( string $name, string $label = null )
$name string Internal name, used to stop the measure
$label string Public name

stopMeasure() public méthode

Stops a measure
public stopMeasure ( string $name )
$name string

Property Details

$app protected_oe property

The Laravel application instance.
protected Application,Illuminate\Foundation $app
Résultat Illuminate\Foundation\Application

$booted protected_oe property

True when booted.
protected bool $booted
Résultat boolean

$enabled protected_oe property

True when enabled, false disabled an null for still unknown
protected bool $enabled
Résultat boolean

$is_lumen protected_oe property

True when this is a Lumen application
protected bool $is_lumen
Résultat boolean

$version protected_oe property

Normalized Laravel Version
protected string $version
Résultat string