PHP Class DebugKit\Routing\Filter\DebugBarFilter

This class loads all the panels into the registry and binds the correct events into the provided event manager
Inheritance: extends Cake\Routing\DispatcherFilter, use trait Cake\Event\EventManagerTrait
Datei anzeigen Open project: cakephp/debug_kit Class Usage Examples

Protected Properties

Property Type Description
$_defaultConfig array Default configuration.
$_registry DebugKit\Panel\PanelRegistry The panel registry.

Public Methods

Method Description
__construct ( Cake\Event\EventManager $events, array $config ) Constructor
afterDispatch ( Cake\Event\Event $event ) : void Save the toolbar data.
beforeDispatch ( Cake\Event\Event $event ) : void Call the initialize method onl all the loaded panels.
implementedEvents ( ) : array Event bindings
isEnabled ( ) : boolean Check whether or not debug kit is enabled.
loadedPanels ( ) : array Get the list of loaded panels
panel ( string $name ) : DebugPanel | null Get the list of loaded panels
setup ( ) : void Do the required setup work.

Protected Methods

Method Description
_injectScripts ( string $id, Response $response ) : void Injects the JS to build the toolbar.

Method Details

__construct() public method

Constructor
public __construct ( Cake\Event\EventManager $events, array $config )
$events Cake\Event\EventManager The event manager to use.
$config array The configuration data for DebugKit.

_injectScripts() protected method

The toolbar will only be injected if the response's content type contains HTML and there is a tag.
protected _injectScripts ( string $id, Response $response ) : void
$id string ID to fetch data from.
$response Cake\Network\Response The response to augment.
return void

afterDispatch() public method

Save the toolbar data.
public afterDispatch ( Cake\Event\Event $event ) : void
$event Cake\Event\Event The afterDispatch event.
return void

beforeDispatch() public method

Call the initialize method onl all the loaded panels.
public beforeDispatch ( Cake\Event\Event $event ) : void
$event Cake\Event\Event The beforeDispatch event.
return void

implementedEvents() public method

Event bindings
public implementedEvents ( ) : array
return array

isEnabled() public method

Check whether or not debug kit is enabled.
public isEnabled ( ) : boolean
return boolean

loadedPanels() public method

Get the list of loaded panels
public loadedPanels ( ) : array
return array

panel() public method

Get the list of loaded panels
public panel ( string $name ) : DebugPanel | null
$name string The name of the panel you want to get.
return DebugKit\DebugPanel | null The panel or null.

setup() public method

- Build panels. - Connect events
public setup ( ) : void
return void

Property Details

$_defaultConfig protected_oe property

Default configuration.
protected array $_defaultConfig
return array

$_registry protected_oe property

The panel registry.
protected PanelRegistry,DebugKit\Panel $_registry
return DebugKit\Panel\PanelRegistry