Paginator
in package
implements
Countable, IteratorAggregate
Uses
SQLResultCasing
The paginator can handle various complex scenarios with DQL.
Tags
Table of Contents
Interfaces
- Countable
- IteratorAggregate
Properties
- $count : int|null
- $fetchJoinCollection : bool
- $query : Query
- $useOutputWalkers : bool|null
Methods
- __construct() : mixed
- count() : int
- {@inheritDoc}
- getFetchJoinCollection() : bool
- Returns whether the query joins a collection.
- getIterator() : Traversable
- {@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
- convertWhereInIdentifiersToDatabaseValues() : array<string|int, mixed>
- 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|null
$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).
count()
{@inheritDoc}
public
count() : int
Return values
intgetFetchJoinCollection()
Returns whether the query joins a collection.
public
getFetchJoinCollection() : bool
Return values
bool —Whether the query joins a collection.
getIterator()
{@inheritDoc}
public
getIterator() : Traversable
Tags
Return values
TraversablegetQuery()
Returns the query.
public
getQuery() : Query
Return values
QuerygetUseOutputWalkers()
Returns whether the paginator will use an output walker.
public
getUseOutputWalkers() : bool|null
Return values
bool|nullsetUseOutputWalkers()
Sets whether the paginator will use an output walker.
public
setUseOutputWalkers(bool|null $useOutputWalkers) : $this
Parameters
- $useOutputWalkers : bool|null
Tags
Return values
$thisappendTreeWalker()
Appends a custom tree walker to the tree walkers hint.
private
appendTreeWalker(Query $query, string $walkerClass) : void
Parameters
- $query : Query
- $walkerClass : string
Tags
cloneQuery()
private
cloneQuery(Query $query) : Query
Parameters
- $query : Query
Return values
QueryconvertWhereInIdentifiersToDatabaseValues()
private
convertWhereInIdentifiersToDatabaseValues(array<string|int, mixed> $identifiers) : array<string|int, mixed>
Parameters
- $identifiers : array<string|int, mixed>
Return values
array<string|int, mixed>getCountQuery()
Returns Query prepared to count.
private
getCountQuery() : Query
Return values
QueryunbindUnusedQueryParams()
private
unbindUnusedQueryParams(Query $query) : void
Parameters
- $query : Query
useOutputWalker()
Determines whether to use an output walker for the query.
private
useOutputWalker(Query $query) : bool
Parameters
- $query : Query