PHP Класс Barryvdh\Debugbar\DataCollector\QueryCollector

Наследование: extends DebugBar\DataCollector\PDO\PDOCollector
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$explainQuery
$explainTypes
$findSource
$queries
$reflection
$renderSqlWithParams
$showHints ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
$timeCollector

Открытые методы

Метод Описание
__construct ( DebugBar\DataCollector\TimeDataCollector $timeCollector = null )
addQuery ( string $query, array $bindings, float $time, Connection $connection )
collect ( ) {@inheritDoc}
getName ( ) {@inheritDoc}
getWidgets ( ) {@inheritDoc}
reset ( ) Reset the queries.
setExplainSource ( boolean $enabled, array | null $types ) Enable/disable the EXPLAIN queries
setFindSource ( boolean $value = true ) Enable/disable finding the source
setRenderSqlWithParams ( boolean $enabled = true, string $quotationChar = "'" ) Renders the SQL of traced statements with params embedded
setShowHints ( boolean $enabled = true ) Show or hide the hints in the parameters

Защищенные методы

Метод Описание
checkBindings ( $bindings ) : mixed Check bindings for illegal (non UTF-8) strings, like Binary data.
escapeBindings ( array $bindings ) : array Make the bindings safe for outputting.
findSource ( ) Use a backtrace to search for the origin of the query.
findViewFromHash ( string $hash ) : null | string Find the template name from the hash.
formatSql ( string $sql ) : string Removes extra spaces at the beginning and end of the SQL query and its lines.
getTwigInfo ( array $trace ) : array Get the filename/line from a Twig template trace
normalizeFilename ( string $path ) : string Shorten the path by removing the relative links and base dir
performQueryAnalysis ( string $query ) : string Explainer::performQueryAnalysis()

Описание методов

__construct() публичный метод

public __construct ( DebugBar\DataCollector\TimeDataCollector $timeCollector = null )
$timeCollector DebugBar\DataCollector\TimeDataCollector

addQuery() публичный метод

public addQuery ( string $query, array $bindings, float $time, Connection $connection )
$query string
$bindings array
$time float
$connection Illuminate\Database\Connection

checkBindings() защищенный метод

Check bindings for illegal (non UTF-8) strings, like Binary data.
protected checkBindings ( $bindings ) : mixed
$bindings
Результат mixed

collect() публичный метод

{@inheritDoc}
public collect ( )

escapeBindings() защищенный метод

Make the bindings safe for outputting.
protected escapeBindings ( array $bindings ) : array
$bindings array
Результат array

findSource() защищенный метод

Use a backtrace to search for the origin of the query.
protected findSource ( )

findViewFromHash() защищенный метод

Find the template name from the hash.
protected findViewFromHash ( string $hash ) : null | string
$hash string
Результат null | string

formatSql() защищенный метод

Removes extra spaces at the beginning and end of the SQL query and its lines.
protected formatSql ( string $sql ) : string
$sql string
Результат string

getName() публичный метод

{@inheritDoc}
public getName ( )

getTwigInfo() защищенный метод

Get the filename/line from a Twig template trace
protected getTwigInfo ( array $trace ) : array
$trace array
Результат array The file and line

getWidgets() публичный метод

{@inheritDoc}
public getWidgets ( )

normalizeFilename() защищенный метод

Shorten the path by removing the relative links and base dir
protected normalizeFilename ( string $path ) : string
$path string
Результат string

performQueryAnalysis() защищенный метод

Perform simple regex analysis on the code
Автор: e-doceo
protected performQueryAnalysis ( string $query ) : string
$query string
Результат string

reset() публичный метод

Reset the queries.
public reset ( )

setExplainSource() публичный метод

Enable/disable the EXPLAIN queries
public setExplainSource ( boolean $enabled, array | null $types )
$enabled boolean
$types array | null Array of types to explain queries (select/insert/update/delete)

setFindSource() публичный метод

Enable/disable finding the source
public setFindSource ( boolean $value = true )
$value boolean

setRenderSqlWithParams() публичный метод

Renders the SQL of traced statements with params embedded
public setRenderSqlWithParams ( boolean $enabled = true, string $quotationChar = "'" )
$enabled boolean
$quotationChar string NOT USED

setShowHints() публичный метод

Show or hide the hints in the parameters
public setShowHints ( boolean $enabled = true )
$enabled boolean

Описание свойств

$explainQuery защищенное свойство

protected $explainQuery

$explainTypes защищенное свойство

protected $explainTypes

$findSource защищенное свойство

protected $findSource

$queries защищенное свойство

protected $queries

$reflection защищенное свойство

protected $reflection

$renderSqlWithParams защищенное свойство

protected $renderSqlWithParams

$showHints защищенное свойство

['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
protected $showHints

$timeCollector защищенное свойство

protected $timeCollector