class Paginator implements Countable, IteratorAggregate

The paginator can handle various complex scenarios with DQL.

Methods

__construct(Query|QueryBuilder $query, boolean $fetchJoinCollection = true)

Constructor.

Query
getQuery()

Returns the query.

boolean
getFetchJoinCollection()

Returns whether the query joins a collection.

bool|null
getUseOutputWalkers()

Returns whether the paginator will use an output walker.

$this
setUseOutputWalkers(bool|null $useOutputWalkers)

Sets whether the paginator will use an output walker.

count()

{@inheritdoc}

getIterator()

{@inheritdoc}

Details

at line 63
__construct(Query|QueryBuilder $query, boolean $fetchJoinCollection = true)

Constructor.

Parameters

Query|QueryBuilder $query A Doctrine ORM query or query builder.
boolean $fetchJoinCollection Whether the query joins a collection (true by default).

at line 78
Query getQuery()

Returns the query.

Return Value

Query

at line 88
boolean getFetchJoinCollection()

Returns whether the query joins a collection.

Return Value

boolean Whether the query joins a collection.

at line 98
bool|null getUseOutputWalkers()

Returns whether the paginator will use an output walker.

Return Value

bool|null

at line 110
$this setUseOutputWalkers(bool|null $useOutputWalkers)

Sets whether the paginator will use an output walker.

Parameters

bool|null $useOutputWalkers

Return Value

$this

at line 119
count()

{@inheritdoc}

at line 135
getIterator()

{@inheritdoc}