| @@ 361-369 (lines=9) @@ | ||
| 358 | * |
|
| 359 | * @return Document|null |
|
| 360 | */ |
|
| 361 | public function getDocumentByReference(array $ref, $useDocumentPool = true) |
|
| 362 | { |
|
| 363 | $documentArray = $this->getMongoDB()->getDBRef($ref); |
|
| 364 | if (null === $documentArray) { |
|
| 365 | return null; |
|
| 366 | } |
|
| 367 | ||
| 368 | return $this->getCollection($ref['$ref'])->hydrate($documentArray, $useDocumentPool); |
|
| 369 | } |
|
| 370 | ||
| 371 | /** |
|
| 372 | * Get instance of GridFS |
|
| @@ 605-613 (lines=9) @@ | ||
| 602 | * |
|
| 603 | * @return Document|null |
|
| 604 | */ |
|
| 605 | public function getDocumentByReference(array $ref, $useDocumentPool = true) |
|
| 606 | { |
|
| 607 | $documentArray = $this->getMongoCollection()->getDBRef($ref); |
|
| 608 | if (null === $documentArray) { |
|
| 609 | return null; |
|
| 610 | } |
|
| 611 | ||
| 612 | return $this->hydrate($documentArray, $useDocumentPool); |
|
| 613 | } |
|
| 614 | ||
| 615 | /** |
|
| 616 | * Get document by id directly omitting cache |
|