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
파일 보기 프로젝트 열기: bolt/bolt 1 사용 예제들

보호된 프로퍼티들

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