Paginator
in package
implements
Countable, IteratorAggregate
Uses
SQLResultCasing
The paginator can handle various complex scenarios with DQL.
Tags
Interfaces, Classes, Traits and Enums
- Countable
- IteratorAggregate
Table of Contents
- $count : int
- $fetchJoinCollection : bool
- $query : Query
- $useOutputWalkers : bool|null
- __construct() : mixed
- count() : int
- {@inheritdoc}
- getFetchJoinCollection() : bool
- Returns whether the query joins a collection.
- getIterator() : ArrayIterator
- {@inheritdoc}
- getQuery() : Query
- Returns the query.
- getUseOutputWalkers() : bool|null
- Returns whether the paginator will use an output walker.
- setUseOutputWalkers() : $this
- Sets whether the paginator will use an output walker.
- appendTreeWalker() : void
- Appends a custom tree walker to the tree walkers hint.
- cloneQuery() : Query
- getCountQuery() : Query
- Returns Query prepared to count.
- unbindUnusedQueryParams() : void
- useOutputWalker() : bool
- Determines whether to use an output walker for the query.
Properties
$count
private
int
$count
$fetchJoinCollection
private
bool
$fetchJoinCollection
$query
private
Query
$query
$useOutputWalkers
private
bool|null
$useOutputWalkers
Methods
__construct()
public
__construct(Query|QueryBuilder $query[, bool $fetchJoinCollection = true ]) : mixed
Parameters
- $query : Query|QueryBuilder
-
A Doctrine ORM query or query builder.
- $fetchJoinCollection : bool = true
-
Whether the query joins a collection (true by default).
Return values
mixed —count()
{@inheritdoc}
public
count() : int
Return values
int —getFetchJoinCollection()
Returns whether the query joins a collection.
public
getFetchJoinCollection() : bool
Return values
bool —Whether the query joins a collection.
getIterator()
{@inheritdoc}
public
getIterator() : ArrayIterator
Tags
Return values
ArrayIterator —getQuery()
Returns the query.
public
getQuery() : Query
Return values
Query —getUseOutputWalkers()
Returns whether the paginator will use an output walker.
public
getUseOutputWalkers() : bool|null
Return values
bool|null —setUseOutputWalkers()
Sets whether the paginator will use an output walker.
public
setUseOutputWalkers(bool|null $useOutputWalkers) : $this
Parameters
- $useOutputWalkers : bool|null
Tags
Return values
$this —appendTreeWalker()
Appends a custom tree walker to the tree walkers hint.
private
appendTreeWalker(Query $query, string $walkerClass) : void
Parameters
- $query : Query
- $walkerClass : string
Tags
Return values
void —cloneQuery()
private
cloneQuery(Query $query) : Query
Parameters
- $query : Query
Return values
Query —getCountQuery()
Returns Query prepared to count.
private
getCountQuery() : Query
Return values
Query —unbindUnusedQueryParams()
private
unbindUnusedQueryParams(Query $query) : void
Parameters
- $query : Query
Return values
void —useOutputWalker()
Determines whether to use an output walker for the query.
private
useOutputWalker(Query $query) : bool
Parameters
- $query : Query