PHP Class Snowair\Debugbar\PhalconDebugbar

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

Public Properties

Property Type Description
$isDebugbarRequest

Protected Properties

Property Type Description
$booted
$config
$di Phalcon\DI

Public Methods

Method 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

Protected Methods

Method Description
createProxy ( $backend, $collector )
isJsonRequest ( ) : boolean
selectStorage ( DebugBar\DebugBar $debugbar )

Method Details

__call() public method

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

__construct() public method

public __construct ( $di )

addException() public method

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

addMeasure() public method

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

addMeasurePoint() public method

public addMeasurePoint ( $label, $start = null )

addMessage() public method

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

attachCache() public method

public attachCache ( $cacheService )

attachDb() public method

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

attachMailer() public method

public attachMailer ( $mailer )

attachServices() public method

public attachServices ( )

attachView() public method

public attachView ( $view )
$view

boot() public method

启动debugbar: 设置collector
public boot ( )

collect() public method

Collects the data from the collectors
public collect ( ) : array
return array

createProxy() protected method

protected createProxy ( $backend, $collector )

debugbarRequestCollector() public method

disable() public method

public disable ( )

enable() public method

public enable ( )

getJavascriptRenderer() public method

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

injectDebugbar() public method

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

isEnabled() public method

检查是否启用了debugbar
public isEnabled ( ) : boolean
return boolean

isJsonRequest() protected method

protected isJsonRequest ( ) : boolean
return boolean

isRedirection() public method

public isRedirection ( Phalcon\Http\Response $response ) : boolean
$response Phalcon\Http\Response
return boolean

measure() public method

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

modifyResponse() public method

public modifyResponse ( Phalcon\Http\Response $response ) : mixed
$response Phalcon\Http\Response
return mixed

selectStorage() protected method

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

shouldCollect() public method

public shouldCollect ( $name, $default = false )

sortCollectors() public method

public sortCollectors ( )

startMeasure() public method

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 method

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
return Phalcon\DI

$isDebugbarRequest public_oe property

public $isDebugbarRequest