__construct() public method

Create a new aggregation builder.
public __construct ( Doctrine\MongoDB\Collection $collection )
$collection Doctrine\MongoDB\Collection
Beispiel #1
0
 /**
  * Create a new aggregation builder.
  *
  * @param DocumentManager $dm
  * @param string $documentName
  */
 public function __construct(DocumentManager $dm, $documentName)
 {
     $this->dm = $dm;
     $this->class = $this->dm->getClassMetadata($documentName);
     parent::__construct($this->dm->getDocumentCollection($documentName));
 }