PHP Class Yii2Debug, yii2-debug

Since: 1.1.13
Author: Roman Zhuravlev ([email protected])
Inheritance: extends CApplicationComponent
Show file Open project: zhuravljov/yii2-debug Class Usage Examples

Public Properties

Property Type Description
$accessExpression Additional php expression for access evaluation.
$allowedIPs the list of IPs that are allowed to access this module. Each array element represents a single IP filter which can be either an IP address or an address with wildcard (e.g. 192.168.0.*) to represent a network segment. The default value is ['127.0.0.1', '::1'], which means the module can only be accessed by localhost.
$enabled enable/disable component in application.
$hiddenConfigOptions list of unsecure component options (like login, passwords, secret keys) that will be hidden in application configuration page.
$highlightCode highlight code in debug logs.
$historySize the maximum number of debug data files to keep. If there are more files generated, the oldest ones will be removed.
$internalUrls use nice route rules in debug module.
$logPath the directory storing the debugger data files. This can be specified using a path alias.
$moduleId module ID for viewing stored debug logs.
$panels list debug panels. The array keys are the panel IDs, and values are the corresponding panel class names or configuration arrays. This will be merged with ::corePanels(). You may reconfigure a core panel via this property by using the same panel ID. You may also disable a core panel by setting it to be false in this property.
$showConfig show brief application configuration.

Public Methods

Method Description
checkAccess ( ) : boolean Check access rights.
dump ( mixed $data ) Dump variable to debug log.
getLock ( string $tag ) : boolean
getTag ( ) : string
init ( ) Panel initialization.
prepareData ( mixed $data ) : array Convert data to plain array in recursive manner.
setLock ( string $tag, boolean $value )

Protected Methods

Method Description
corePanels ( ) : array
coreUrlRules ( )
initToolbar ( ) Register debug panel scripts.
onEndRequest ( CEvent $event )
processDebug ( ) Log processing routine.
resizeHistory ( &$manifest ) Debug files rotation according to {@link ::$historySize}.

Private Methods

Method Description
updateIndexFile ( string $indexFile, array $summary ) Updates index file with summary log data

Method Details

checkAccess() public method

Check access rights.
public checkAccess ( ) : boolean
return boolean

corePanels() protected method

protected corePanels ( ) : array
return array default panels

coreUrlRules() protected method

protected coreUrlRules ( )

dump() public static method

Dump variable to debug log.
public static dump ( mixed $data )
$data mixed

getLock() public method

public getLock ( string $tag ) : boolean
$tag string
return boolean

getTag() public method

public getTag ( ) : string
return string current page tag

init() public method

Generate unique tag for page. Attach panels, log watcher. Register scripts for printing debug panel.
public init ( )

initToolbar() protected method

Register debug panel scripts.
protected initToolbar ( )

onEndRequest() protected method

protected onEndRequest ( CEvent $event )
$event CEvent

prepareData() public static method

Convert data to plain array in recursive manner.
public static prepareData ( mixed $data ) : array
$data mixed
return array

processDebug() protected method

Log processing routine.
protected processDebug ( )

resizeHistory() protected method

Debug files rotation according to {@link ::$historySize}.
protected resizeHistory ( &$manifest )
$manifest

setLock() public method

public setLock ( string $tag, boolean $value )
$tag string
$value boolean

Property Details

$accessExpression public property

Additional php expression for access evaluation.
public $accessExpression

$allowedIPs public property

the list of IPs that are allowed to access this module. Each array element represents a single IP filter which can be either an IP address or an address with wildcard (e.g. 192.168.0.*) to represent a network segment. The default value is ['127.0.0.1', '::1'], which means the module can only be accessed by localhost.
public $allowedIPs

$enabled public property

enable/disable component in application.
public $enabled

$hiddenConfigOptions public property

list of unsecure component options (like login, passwords, secret keys) that will be hidden in application configuration page.
public $hiddenConfigOptions

$highlightCode public property

highlight code in debug logs.
public $highlightCode

$historySize public property

the maximum number of debug data files to keep. If there are more files generated, the oldest ones will be removed.
public $historySize

$internalUrls public property

use nice route rules in debug module.
public $internalUrls

$logPath public property

the directory storing the debugger data files. This can be specified using a path alias.
public $logPath

$moduleId public property

module ID for viewing stored debug logs.
public $moduleId

$panels public property

list debug panels. The array keys are the panel IDs, and values are the corresponding panel class names or configuration arrays. This will be merged with ::corePanels(). You may reconfigure a core panel via this property by using the same panel ID. You may also disable a core panel by setting it to be false in this property.
public $panels

$showConfig public property

show brief application configuration.
public $showConfig