Doctrine\MongoDB\Aggregation\Builder::unwind PHP Method

unwind() public method

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.
See also: 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
return Doctrine\MongoDB\Aggregation\Stage\Unwind
    public function unwind($fieldName)
    {
        return $this->addStage(new Stage\Unwind($this, $fieldName));
    }

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function unwind($fieldName)
 {
     $fieldName = $this->getDocumentPersister()->prepareFieldName($fieldName);
     return parent::unwind($fieldName);
 }
All Usage Examples Of Doctrine\MongoDB\Aggregation\Builder::unwind