PHP Class Doctrine\ODM\MongoDB\Aggregation\Builder

Inheritance: extends Doctrine\MongoDB\Aggregation\Builder
Mostra file Open project: doctrine/mongodb-odm

Public Methods

Method Description
__construct ( DocumentManager $dm, string $documentName ) Create a new aggregation builder.
execute ( $options = [] )
expr ( ) : Expr
getPipeline ( ) : array Returns the assembled aggregation pipeline
hydrate ( string $className ) : self Set which class to use when hydrating results as document class instances.
lookup ( string $from ) : Lookup
match ( ) : Match
matchExpr ( ) : Doctrine\ODM\MongoDB\Query\Expr
out ( string $from ) : Out
sort ( $fieldName, $order = null )
unwind ( $fieldName )

Private Methods

Method Description
applyFilters ( array $query ) : array Applies filters and discriminator queries to the pipeline
getDocumentPersister ( ) : DocumentPersister
prepareCursor ( Doctrine\MongoDB\CommandCursor $cursor ) : CommandCursor

Method Details

__construct() public method

Create a new aggregation builder.
public __construct ( DocumentManager $dm, string $documentName )
$dm Doctrine\ODM\MongoDB\DocumentManager
$documentName string

execute() public method

public execute ( $options = [] )

expr() public method

public expr ( ) : Expr
return Expr

getPipeline() public method

For pipelines where the first stage is a $geoNear stage, it will apply the document filters and discriminator queries to the query portion of the geoNear operation. For all other pipelines, it prepends a $match stage containing the required query.
public getPipeline ( ) : array
return array

hydrate() public method

Set which class to use when hydrating results as document class instances.
public hydrate ( string $className ) : self
$className string
return self

lookup() public method

public lookup ( string $from ) : Lookup
$from string
return Doctrine\ODM\MongoDB\Aggregation\Stage\Lookup

match() public method

public match ( ) : Match
return Doctrine\ODM\MongoDB\Aggregation\Stage\Match

matchExpr() public method

public matchExpr ( ) : Doctrine\ODM\MongoDB\Query\Expr
return Doctrine\ODM\MongoDB\Query\Expr

out() public method

public out ( string $from ) : Out
$from string
return Doctrine\ODM\MongoDB\Aggregation\Stage\Out

sort() public method

public sort ( $fieldName, $order = null )

unwind() public method

public unwind ( $fieldName )