Since: 1.2
Author: alcaeus (alcaeus@alcaeus.org)
Inheritance: extends Doctrine\MongoDB\Aggregation\Stage
Exemplo n.º 1
0
 /**
  * @param ClassMetadata $classMetadata
  * @return $this
  *
  * @throws MappingException
  */
 private function fromDocument(ClassMetadata $classMetadata)
 {
     if ($classMetadata->isSharded()) {
         throw MappingException::cannotUseShardedCollectionInOutStage($classMetadata->name);
     }
     return parent::out($classMetadata->getCollection());
 }
Exemplo n.º 2
0
 public function testOutStage()
 {
     $outStage = new Out($this->getTestAggregationBuilder(), 'someCollection');
     $this->assertSame(array('$out' => 'someCollection'), $outStage->getExpression());
 }