public __construct ( Doctrine\MongoDB\Collection $collection ) | ||
$collection | Doctrine\MongoDB\Collection |
public function __construct(Collection $collection)
{
$this->collection = $collection;
}
/** * 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)); }