|
@@ 429-435 (lines=7) @@
|
| 426 |
|
* @param string|array|null $expression Optional. A replacement expression that |
| 427 |
|
* resolves to a document. |
| 428 |
|
*/ |
| 429 |
|
public function replaceRoot($expression = null) : Stage\ReplaceRoot |
| 430 |
|
{ |
| 431 |
|
$stage = new Stage\ReplaceRoot($this, $this->dm, $this->class, $expression); |
| 432 |
|
$this->addStage($stage); |
| 433 |
|
|
| 434 |
|
return $stage; |
| 435 |
|
} |
| 436 |
|
|
| 437 |
|
/** |
| 438 |
|
* Controls if resulting iterator should be wrapped with CachingIterator. |
|
@@ 502-508 (lines=7) @@
|
| 499 |
|
* |
| 500 |
|
* @see http://docs.mongodb.org/manual/reference/operator/aggregation/sortByCount/ |
| 501 |
|
*/ |
| 502 |
|
public function sortByCount(string $expression) : Stage\SortByCount |
| 503 |
|
{ |
| 504 |
|
$stage = new Stage\SortByCount($this, $expression, $this->dm, $this->class); |
| 505 |
|
$this->addStage($stage); |
| 506 |
|
|
| 507 |
|
return $stage; |
| 508 |
|
} |
| 509 |
|
|
| 510 |
|
/** |
| 511 |
|
* Deconstructs an array field from the input documents to output a document |