Documentation

DoctrineExtension extends AbstractExtension
in package

This class contains the needed functions in order to do the query highlighting

Table of Contents

Properties

$sqlFormatter  : SqlFormatter

Methods

formatQuery()  : string
Formats and/or highlights the given SQL statement.
formatSql()  : string
getFilters()  : array<string|int, TwigFilter>
Define our functions
getFunctions()  : array<string|int, TwigFunction>
Returns a list of functions to add to the existing list.
getName()  : string
Get the name of the extension
getNodeVisitors()  : array<string|int, NodeVisitorInterface>
Returns the node visitor instances to add to the existing list.
getOperators()  : array<string|int, array<string|int, mixed>>
Returns a list of operators to add to the existing list.
getTests()  : array<string|int, TwigTest>
Returns a list of tests to add to the existing list.
getTokenParsers()  : array<string|int, TokenParserInterface>
Returns the token parser instances to add to the existing list.
prettifySql()  : string
replaceQueryParameters()  : string
Return a query with the parameters replaced
setUpSqlFormatter()  : void

Properties

Methods

formatQuery()

Formats and/or highlights the given SQL statement.

public formatQuery(string $sql[, bool $highlightOnly = false ]) : string
Parameters
$sql : string
$highlightOnly : bool = false

If true the query is not formatted, just highlighted

Return values
string

formatSql()

public formatSql(string $sql, bool $highlight) : string
Parameters
$sql : string
$highlight : bool
Return values
string

getName()

Get the name of the extension

public getName() : string
Return values
string

getOperators()

Returns a list of operators to add to the existing list.

public getOperators() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>>

First array of unary operators, second array of binary operators

prettifySql()

public prettifySql(string $sql) : string
Parameters
$sql : string
Return values
string

replaceQueryParameters()

Return a query with the parameters replaced

public replaceQueryParameters(string $query, array<string|int, mixed>|Data $parameters) : string
Parameters
$query : string
$parameters : array<string|int, mixed>|Data
Return values
string

setUpSqlFormatter()

private setUpSqlFormatter([bool $highlight = true ][, bool $legacy = false ]) : void
Parameters
$highlight : bool = true
$legacy : bool = false

        
On this page

Search results