class Paginator implements Countable, IteratorAggregate (View source)

The paginator can handle various complex scenarios with DQL.

Methods

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

Constructor.

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

__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).

Query getQuery()

Returns the query.

Return Value

Query

boolean getFetchJoinCollection()

Returns whether the query joins a collection.

Return Value

boolean Whether the query joins a collection.

bool|null getUseOutputWalkers()

Returns whether the paginator will use an output walker.

Return Value

bool|null

$this setUseOutputWalkers(bool|null $useOutputWalkers)

Sets whether the paginator will use an output walker.

Parameters

bool|null $useOutputWalkers

Return Value

$this

count()

{@inheritdoc}

getIterator()

{@inheritdoc}