PHP Класс Barryvdh\Debugbar\LaravelDebugbar

Rest is added in Service Provider
Наследование: extends DebugBar\DebugBar
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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 )

Описание методов

__call() публичный Метод

Magic calls for adding messages
public __call ( string $method, array $args ) : mixed | void
$method string
$args array
Результат mixed | void

__construct() публичный Метод

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

addClockworkHeaders() защищенный Метод

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

addException() публичный Метод

Adds an exception to be profiled in the debug bar
Устаревший: in favor of addThrowable
public addException ( Exception $e )
$e Exception

addMeasure() публичный Метод

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

addMessage() публичный Метод

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

addThrowable() публичный Метод

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

boot() публичный Метод

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

checkVersion() защищенный Метод

Check the version of Laravel
protected checkVersion ( string $version, string $operator = ">=" ) : boolean
$version string
$operator string (default: '>=')
Результат boolean

collect() публичный Метод

Collects the data from the collectors
public collect ( ) : array
Результат array

collectConsole() публичный Метод

Collect data in a CLI request
public collectConsole ( ) : array
Результат array

disable() публичный Метод

Disable the Debugbar
public disable ( )

enable() публичный Метод

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

getJavascriptRenderer() публичный Метод

Returns a JavascriptRenderer for this instance
public getJavascriptRenderer ( string $baseUrl = null, $basePath = null ) : JavascriptRenderer
$baseUrl string
Результат JavascriptRenderer

injectDebugbar() публичный Метод

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() защищенный Метод

Check if this is a request to the Debugbar OpenHandler
protected isDebugbarRequest ( ) : boolean
Результат boolean

isEnabled() публичный Метод

Check if the Debugbar is enabled
public isEnabled ( ) : boolean
Результат boolean

isJsonRequest() защищенный Метод

protected isJsonRequest ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
Результат boolean

isLumen() защищенный Метод

protected isLumen ( )

measure() публичный Метод

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

modifyResponse() публичный Метод

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
Результат Symfony\Component\HttpFoundation\Response

selectStorage() защищенный Метод

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

shouldCollect() публичный Метод

public shouldCollect ( $name, $default = false )

startMeasure() публичный Метод

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

stopMeasure() публичный Метод

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

Описание свойств

$app защищенное свойство

The Laravel application instance.
protected Application,Illuminate\Foundation $app
Результат Illuminate\Foundation\Application

$booted защищенное свойство

True when booted.
protected bool $booted
Результат boolean

$enabled защищенное свойство

True when enabled, false disabled an null for still unknown
protected bool $enabled
Результат boolean

$is_lumen защищенное свойство

True when this is a Lumen application
protected bool $is_lumen
Результат boolean

$version защищенное свойство

Normalized Laravel Version
protected string $version
Результат string