Documentation

Paginator
in package
implements Countable, IteratorAggregate Uses SQLResultCasing

The paginator can handle various complex scenarios with DQL.

Tags
template-covariant

T

implements

IteratorAggregate<array-key, T>

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

$fetchJoinCollection

private bool $fetchJoinCollection

$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
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() : Traversable
Tags
psalm-return

Traversable<array-key, T>

Return values
Traversable

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
psalm-return

static<T>

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
psalm-param

class-string $walkerClass

convertWhereInIdentifiersToDatabaseValues()

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
Query

unbindUnusedQueryParams()

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
Return values
bool

        
On this page

Search results