\DebugBar\BridgePropelCollector

A Propel logger which acts as a data collector

http://propelorm.org/

Will log queries and display them using the SQLQueries widget. You can provide a LoggerInterface object to forward non-query related message to.

Example: $debugbar->addCollector(new PropelCollector($debugbar['messages'])); PropelCollector::enablePropelProfiling();

Summary

Methods
Properties
Constants
setDefaultDataFormatter()
getDefaultDataFormatter()
setDataFormatter()
getDataFormatter()
formatVar()
formatDuration()
formatBytes()
enablePropelProfiling()
__construct()
setLogQueriesToLogger()
isLogQueriesToLogger()
emergency()
alert()
crit()
err()
warning()
notice()
info()
debug()
log()
collect()
getName()
getWidgets()
getAssets()
No public properties found
No constants found
convertLogLevel()
parseAndLogSqlQuery()
$dataFormater
$logger
$statements
$accumulatedTime
$peakMemory
N/A
No private methods found
$defaultDataFormatter
N/A

Properties

$dataFormater

$dataFormater : 

Type

$logger

$logger : 

Type

$statements

$statements : 

Type

$accumulatedTime

$accumulatedTime : 

Type

$peakMemory

$peakMemory : 

Type

$defaultDataFormatter

$defaultDataFormatter : 

Type

Methods

setDefaultDataFormatter()

setDefaultDataFormatter(\DebugBar\DataFormatter\DataFormatterInterface  $formater) 

Sets the default data formater instance used by all collectors subclassing this class

Parameters

\DebugBar\DataFormatter\DataFormatterInterface $formater

setDataFormatter()

setDataFormatter(\DebugBar\DataFormatter\DataFormatterInterface  $formater) : $this

Sets the data formater instance used by this collector

Parameters

\DebugBar\DataFormatter\DataFormatterInterface $formater

Returns

$this

formatVar()

formatVar(  $var) 

Parameters

$var

formatDuration()

formatDuration(  $seconds) 

Parameters

$seconds

formatBytes()

formatBytes(  $size,   $precision = 2) 

Parameters

$size
$precision

enablePropelProfiling()

enablePropelProfiling(\PropelConfiguration  $config = null) 

Sets the needed configuration option in propel to enable query logging

Parameters

\PropelConfiguration $config

Apply profiling on a specific config

__construct()

__construct(\Psr\Log\LoggerInterface  $logger = null, \PropelPDO  $conn = null) 

Parameters

\Psr\Log\LoggerInterface $logger

A logger to forward non-query log lines to

\PropelPDO $conn

Bound this collector to a connection only

setLogQueriesToLogger()

setLogQueriesToLogger(  $enable = true) 

Parameters

$enable

isLogQueriesToLogger()

isLogQueriesToLogger() 

emergency()

emergency(  $m) 

Parameters

$m

alert()

alert(  $m) 

Parameters

$m

crit()

crit(  $m) 

Parameters

$m

err()

err(  $m) 

Parameters

$m

warning()

warning(  $m) 

Parameters

$m

notice()

notice(  $m) 

Parameters

$m

info()

info(  $m) 

Parameters

$m

debug()

debug(  $m) 

Parameters

$m

log()

log(  $message,   $severity = null) 

Parameters

$message
$severity

collect()

collect() 

getName()

getName() 

getWidgets()

getWidgets() : array

Returns a hash where keys are control names and their values an array of options as defined in {@see DebugBar\JavascriptRenderer::addControl()}

Returns

array

getAssets()

getAssets() : array

Returns an array with the following keys: - base_path - base_url - css: an array of filenames - js: an array of filenames

Returns

array

convertLogLevel()

convertLogLevel(integer  $level) : string

Converts Propel log levels to PSR log levels

Parameters

integer $level

Returns

string

parseAndLogSqlQuery()

parseAndLogSqlQuery(string  $message) 

Parse a log line to extract query information

Parameters

string $message