PHP 클래스 Barryvdh\Debugbar\DataCollector\QueryCollector

상속: extends DebugBar\DataCollector\PDO\PDOCollector
파일 보기 프로젝트 열기: barryvdh/laravel-debugbar 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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