PHP Class Snowair\Debugbar\PhalconDebugbar

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

Méthodes publiques

Свойство Type Description
$isDebugbarRequest

Protected Properties

Свойство Type Description
$booted
$config
$di Phalcon\DI

Méthodes publiques

Méthode Description
__call ( string $method, array $args ) : mixed | void Magic calls for adding messages
__construct ( $di )
addException ( Exception $e ) Adds an exception to be profiled in the debug bar
addMeasure ( string $label, float $start, float $end ) Adds a measure
addMeasurePoint ( $label, $start = null )
addMessage ( mixed $message, string $label = 'info' ) Adds a message to the MessagesCollector
attachCache ( $cacheService )
attachDb ( Phalcon\Db\Adapter $db )
attachMailer ( $mailer )
attachServices ( )
attachView ( $view )
boot ( ) 启动debugbar: 设置collector
collect ( ) : array Collects the data from the collectors
debugbarRequestCollector ( )
disable ( )
enable ( )
getJavascriptRenderer ( string $baseUrl = null, null $basePath = null ) : Snowair\Debugbar\JsRender Returns a JavascriptRenderer for this instance
injectDebugbar ( Phalcon\Http\Response $response ) Injects the web debug toolbar into the given Response.
isEnabled ( ) : boolean 检查是否启用了debugbar
isRedirection ( Phalcon\Http\Response $response ) : boolean
measure ( string $label, Closure $closure ) Utility function to measure the execution of a Closure
modifyResponse ( Phalcon\Http\Response $response ) : mixed
shouldCollect ( $name, $default = false )
sortCollectors ( )
startMeasure ( string $name, string $label = null ) Starts a measure
stopMeasure ( string $name ) Stops a measure

Méthodes protégées

Méthode Description
createProxy ( $backend, $collector )
isJsonRequest ( ) : boolean
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 ( $di )

addException() public méthode

Adds an exception to be profiled in the debug bar
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

addMeasurePoint() public méthode

public addMeasurePoint ( $label, $start = null )

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

attachCache() public méthode

public attachCache ( $cacheService )

attachDb() public méthode

public attachDb ( Phalcon\Db\Adapter $db )
$db Phalcon\Db\Adapter

attachMailer() public méthode

public attachMailer ( $mailer )

attachServices() public méthode

public attachServices ( )

attachView() public méthode

public attachView ( $view )
$view

boot() public méthode

启动debugbar: 设置collector
public boot ( )

collect() public méthode

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

createProxy() protected méthode

protected createProxy ( $backend, $collector )

debugbarRequestCollector() public méthode

disable() public méthode

public disable ( )

enable() public méthode

public enable ( )

getJavascriptRenderer() public méthode

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

injectDebugbar() public méthode

Based on https://github.com/symfony/WebProfilerBundle/blob/master/EventListener/WebDebugToolbarListener.php
public injectDebugbar ( Phalcon\Http\Response $response )
$response Phalcon\Http\Response

isEnabled() public méthode

检查是否启用了debugbar
public isEnabled ( ) : boolean
Résultat boolean

isJsonRequest() protected méthode

protected isJsonRequest ( ) : boolean
Résultat boolean

isRedirection() public méthode

public isRedirection ( Phalcon\Http\Response $response ) : boolean
$response Phalcon\Http\Response
Résultat boolean

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

public modifyResponse ( Phalcon\Http\Response $response ) : mixed
$response Phalcon\Http\Response
Résultat mixed

selectStorage() protected méthode

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

shouldCollect() public méthode

public shouldCollect ( $name, $default = false )

sortCollectors() public méthode

public sortCollectors ( )

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

$booted protected_oe property

protected $booted

$config protected_oe property

protected $config

$di protected_oe property

protected DI,Phalcon $di
Résultat Phalcon\DI

$isDebugbarRequest public_oe property

public $isDebugbarRequest