PHP Класс Doctrine\MongoDB\Aggregation\Stage

С версии: 1.2
Автор: alcaeus ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$builder Builder

Открытые методы

Метод Описание
__construct ( Builder $builder )
execute ( array $options = [] ) : Doctrine\MongoDB\Iterator Executes the aggregation pipeline
geoNear ( float | array | GeoJson\Geometry\Point $x, float $y = null ) : Doctrine\MongoDB\Aggregation\Stage\GeoNear Outputs documents in order of nearest to farthest from a specified point.
getExpression ( ) : array Assembles the aggregation stage
getPipeline ( ) : array Returns the assembled aggregation pipeline
group ( ) : Group Groups documents by some specified expression and outputs to the next stage a document for each distinct grouping.
indexStats ( ) : Doctrine\MongoDB\Aggregation\Stage\IndexStats Returns statistics regarding the use of each index for the collection.
limit ( integer $limit ) : Doctrine\MongoDB\Aggregation\Stage\Limit Limits the number of documents passed to the next stage in the pipeline.
lookup ( string $from ) : Doctrine\MongoDB\Aggregation\Stage\Lookup Performs a left outer join to an unsharded collection in the same database to filter in documents from the “joined” collection for processing.
match ( ) : Match Filters the documents to pass only the documents that match the specified condition(s) to the next pipeline stage.
out ( string $collection ) : Out Takes the documents returned by the aggregation pipeline and writes them to a specified collection. This must be the last stage in the pipeline.
project ( ) : Project Passes along the documents with only the specified fields to the next stage in the pipeline. The specified fields can be existing fields from the input documents or newly computed fields.
redact ( ) : Doctrine\MongoDB\Aggregation\Stage\Redact Restricts the contents of the documents based on information stored in the documents themselves.
sample ( integer $size ) : Doctrine\MongoDB\Aggregation\Stage\Sample Randomly selects the specified number of documents from its input.
skip ( integer $skip ) : Doctrine\MongoDB\Aggregation\Stage\Skip Skips over the specified number of documents that pass into the stage and passes the remaining documents to the next stage in the pipeline.
sort ( array | string $fieldName, integer | string $order = null ) : Doctrine\MongoDB\Aggregation\Stage\Sort Sorts all input documents and returns them to the pipeline in sorted order.
unwind ( string $fieldName ) : Doctrine\MongoDB\Aggregation\Stage\Unwind Deconstructs an array field from the input documents to output a document for each element. Each output document is the input document with the value of the array field replaced by the element.

Описание методов

__construct() публичный Метод

public __construct ( Builder $builder )
$builder Builder

execute() публичный Метод

Executes the aggregation pipeline
public execute ( array $options = [] ) : Doctrine\MongoDB\Iterator
$options array
Результат Doctrine\MongoDB\Iterator

geoNear() публичный Метод

You can only use this as the first stage of a pipeline.
См. также: http://docs.mongodb.org/manual/reference/operator/aggregation/geoNear/
public geoNear ( float | array | GeoJson\Geometry\Point $x, float $y = null ) : Doctrine\MongoDB\Aggregation\Stage\GeoNear
$x float | array | GeoJson\Geometry\Point
$y float
Результат Doctrine\MongoDB\Aggregation\Stage\GeoNear

getExpression() абстрактный публичный Метод

Assembles the aggregation stage
abstract public getExpression ( ) : array
Результат array

getPipeline() публичный Метод

Returns the assembled aggregation pipeline
public getPipeline ( ) : array
Результат array

group() публичный Метод

Groups documents by some specified expression and outputs to the next stage a document for each distinct grouping.
См. также: http://docs.mongodb.org/manual/reference/operator/aggregation/group/
public group ( ) : Group
Результат Doctrine\MongoDB\Aggregation\Stage\Group

indexStats() публичный Метод

Returns statistics regarding the use of each index for the collection.
См. также: https://docs.mongodb.org/manual/reference/operator/aggregation/indexStats/
public indexStats ( ) : Doctrine\MongoDB\Aggregation\Stage\IndexStats
Результат Doctrine\MongoDB\Aggregation\Stage\IndexStats

limit() публичный Метод

Limits the number of documents passed to the next stage in the pipeline.
См. также: http://docs.mongodb.org/manual/reference/operator/aggregation/limit/
public limit ( integer $limit ) : Doctrine\MongoDB\Aggregation\Stage\Limit
$limit integer
Результат Doctrine\MongoDB\Aggregation\Stage\Limit

lookup() публичный Метод

Performs a left outer join to an unsharded collection in the same database to filter in documents from the “joined” collection for processing.
См. также: https://docs.mongodb.org/manual/reference/operator/aggregation/lookup/
public lookup ( string $from ) : Doctrine\MongoDB\Aggregation\Stage\Lookup
$from string
Результат Doctrine\MongoDB\Aggregation\Stage\Lookup

match() публичный Метод

Filters the documents to pass only the documents that match the specified condition(s) to the next pipeline stage.
См. также: http://docs.mongodb.org/manual/reference/operator/aggregation/match/
public match ( ) : Match
Результат Doctrine\MongoDB\Aggregation\Stage\Match

out() публичный Метод

Takes the documents returned by the aggregation pipeline and writes them to a specified collection. This must be the last stage in the pipeline.
См. также: http://docs.mongodb.org/manual/reference/operator/aggregation/out/
public out ( string $collection ) : Out
$collection string
Результат Doctrine\MongoDB\Aggregation\Stage\Out

project() публичный Метод

Passes along the documents with only the specified fields to the next stage in the pipeline. The specified fields can be existing fields from the input documents or newly computed fields.
См. также: http://docs.mongodb.org/manual/reference/operator/aggregation/project/
public project ( ) : Project
Результат Doctrine\MongoDB\Aggregation\Stage\Project

redact() публичный Метод

Restricts the contents of the documents based on information stored in the documents themselves.
См. также: http://docs.mongodb.org/manual/reference/operator/aggregation/redact/
public redact ( ) : Doctrine\MongoDB\Aggregation\Stage\Redact
Результат Doctrine\MongoDB\Aggregation\Stage\Redact

sample() публичный Метод

Randomly selects the specified number of documents from its input.
См. также: https://docs.mongodb.org/manual/reference/operator/aggregation/sample/
public sample ( integer $size ) : Doctrine\MongoDB\Aggregation\Stage\Sample
$size integer
Результат Doctrine\MongoDB\Aggregation\Stage\Sample

skip() публичный Метод

Skips over the specified number of documents that pass into the stage and passes the remaining documents to the next stage in the pipeline.
См. также: http://docs.mongodb.org/manual/reference/operator/aggregation/skip/
public skip ( integer $skip ) : Doctrine\MongoDB\Aggregation\Stage\Skip
$skip integer
Результат Doctrine\MongoDB\Aggregation\Stage\Skip

sort() публичный Метод

If sorting by multiple fields, the first argument should be an array of field name (key) and order (value) pairs.
См. также: http://docs.mongodb.org/manual/reference/operator/aggregation/sort/
public sort ( array | string $fieldName, integer | string $order = null ) : Doctrine\MongoDB\Aggregation\Stage\Sort
$fieldName array | string Field name or array of field/order pairs
$order integer | string Field order (if one field is specified)
Результат Doctrine\MongoDB\Aggregation\Stage\Sort

unwind() публичный Метод

Deconstructs an array field from the input documents to output a document for each element. Each output document is the input document with the value of the array field replaced by the element.
См. также: http://docs.mongodb.org/manual/reference/operator/aggregation/unwind/
public unwind ( string $fieldName ) : Doctrine\MongoDB\Aggregation\Stage\Unwind
$fieldName string The field to unwind. It is automatically prefixed with the $ sign
Результат Doctrine\MongoDB\Aggregation\Stage\Unwind

Описание свойств

$builder защищенное свойство

protected Builder,Doctrine\MongoDB\Aggregation $builder
Результат Builder