| @@ 344-352 (lines=9) @@ | ||
| 341 | * |
|
| 342 | * @return Document|null |
|
| 343 | */ |
|
| 344 | public function getDocumentByReference(array $ref, $useDocumentPool = true) |
|
| 345 | { |
|
| 346 | $documentArray = $this->mongoDB->getDBRef($ref); |
|
| 347 | if (null === $documentArray) { |
|
| 348 | return null; |
|
| 349 | } |
|
| 350 | ||
| 351 | return $this->getCollection($ref['$ref'])->hydrate($documentArray, $useDocumentPool); |
|
| 352 | } |
|
| 353 | ||
| 354 | /** |
|
| 355 | * Get instance of GridFS |
|
| @@ 586-594 (lines=9) @@ | ||
| 583 | * |
|
| 584 | * @return Document|null |
|
| 585 | */ |
|
| 586 | public function getDocumentByReference(array $ref, $useDocumentPool = true) |
|
| 587 | { |
|
| 588 | $documentArray = $this->_mongoCollection->getDBRef($ref); |
|
| 589 | if (null === $documentArray) { |
|
| 590 | return null; |
|
| 591 | } |
|
| 592 | ||
| 593 | return $this->hydrate($documentArray, $useDocumentPool); |
|
| 594 | } |
|
| 595 | ||
| 596 | /** |
|
| 597 | * Get document by id directly omitting cache |
|