PHP Класс Bolt\Storage\Query\SelectQuery

@link https://docs.bolt.cm/templates/content-fetching The resulting QueryBuilder object is then passed through to the individual field handlers where they can perform value transformations.
Автор: Ross Riley ([email protected])
Наследование: implements Bolt\Storage\Query\QueryInterface
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$contentType string
$filters Filter[]
$params array
$parser QueryParameterParser
$qb Doctrine\DBAL\Query\QueryBuilder
$replacements
$singleFetchMode boolean

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

Метод Описание
__construct ( Doctrine\DBAL\Query\QueryBuilder $qb, QueryParameterParser $parser ) Constructor.
__toString ( ) : string
addFilter ( Filter $filter )
build ( ) : Doctrine\DBAL\Query\QueryBuilder Part of the QueryInterface this turns all the input into a Doctrine QueryBuilder object and is usually run just before query execution.
getContentType ( ) : string Gets the ContentType that this query will run against.
getFilters ( ) : Filter[] Returns all the filters attached to the query
getQueryBuilder ( ) : Doctrine\DBAL\Query\QueryBuilder Allows public access to the QueryBuilder object
getSingleFetchMode ( ) : boolean Returns whether the query is in single fetch mode.
getWhereExpression ( ) : CompositeExpression Creates a composite expression that adds all the attached filters individual expressions into a combined one.
getWhereParameters ( ) : array Returns all the parameters for the query.
getWhereParametersFor ( string $fieldName ) : array Gets all the parameters for a specific field name.
setContentType ( string $contentType ) Sets the ContentType that this query will run against.
setParameters ( array $params ) Sets the parameters that will filter / alter the query
setQueryBuilder ( Doctrine\DBAL\Query\QueryBuilder $qb ) Allows replacing the default QueryBuilder.
setSingleFetchMode ( boolean $value ) Turns single fetch mode on or off.
setWhereParameter ( string $key, mixed $value ) Sets all the parameters for a specific field name.

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

Метод Описание
processFilters ( ) Internal method that runs the individual key/value input through the QueryParameterParser. This allows complicated expressions to be turned into simple sql expressions

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

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

Constructor.
public __construct ( Doctrine\DBAL\Query\QueryBuilder $qb, QueryParameterParser $parser )
$qb Doctrine\DBAL\Query\QueryBuilder
$parser QueryParameterParser

__toString() публичный Метод

public __toString ( ) : string
Результат string String representation of query

addFilter() публичный Метод

public addFilter ( Filter $filter )
$filter Filter

build() публичный Метод

That allows modifications to be made to any of the parameters up until query execution time.
public build ( ) : Doctrine\DBAL\Query\QueryBuilder
Результат Doctrine\DBAL\Query\QueryBuilder

getContentType() публичный Метод

Gets the ContentType that this query will run against.
public getContentType ( ) : string
Результат string

getFilters() публичный Метод

Returns all the filters attached to the query
public getFilters ( ) : Filter[]
Результат Filter[]

getQueryBuilder() публичный Метод

Allows public access to the QueryBuilder object
public getQueryBuilder ( ) : Doctrine\DBAL\Query\QueryBuilder
Результат Doctrine\DBAL\Query\QueryBuilder

getSingleFetchMode() публичный Метод

Returns whether the query is in single fetch mode.
public getSingleFetchMode ( ) : boolean
Результат boolean

getWhereExpression() публичный Метод

Creates a composite expression that adds all the attached filters individual expressions into a combined one.
public getWhereExpression ( ) : CompositeExpression
Результат Doctrine\DBAL\Query\Expression\CompositeExpression

getWhereParameters() публичный Метод

Returns all the parameters for the query.
public getWhereParameters ( ) : array
Результат array

getWhereParametersFor() публичный Метод

Gets all the parameters for a specific field name.
public getWhereParametersFor ( string $fieldName ) : array
$fieldName string
Результат array array of key=>value parameters

processFilters() защищенный Метод

Internal method that runs the individual key/value input through the QueryParameterParser. This allows complicated expressions to be turned into simple sql expressions
protected processFilters ( )

setContentType() публичный Метод

Sets the ContentType that this query will run against.
public setContentType ( string $contentType )
$contentType string

setParameters() публичный Метод

Sets the parameters that will filter / alter the query
public setParameters ( array $params )
$params array

setQueryBuilder() публичный Метод

Allows replacing the default QueryBuilder.
public setQueryBuilder ( Doctrine\DBAL\Query\QueryBuilder $qb )
$qb Doctrine\DBAL\Query\QueryBuilder

setSingleFetchMode() публичный Метод

Turns single fetch mode on or off.
public setSingleFetchMode ( boolean $value )
$value boolean

setWhereParameter() публичный Метод

Sets all the parameters for a specific field name.
public setWhereParameter ( string $key, mixed $value )
$key string
$value mixed

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

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

protected string $contentType
Результат string

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

protected Filter[],Bolt\Storage\Query $filters
Результат Filter[]

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

protected array $params
Результат array

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

protected QueryParameterParser,Bolt\Storage\Query $parser
Результат QueryParameterParser

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

protected QueryBuilder,Doctrine\DBAL\Query $qb
Результат Doctrine\DBAL\Query\QueryBuilder

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

protected $replacements

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

protected bool $singleFetchMode
Результат boolean