@@ 604-612 (lines=9) @@ | ||
601 | * |
|
602 | * @return Document|null |
|
603 | */ |
|
604 | public function getDocumentByReference(array $ref, $useDocumentPool = true) |
|
605 | { |
|
606 | $documentArray = $this->_mongoCollection->getDBRef($ref); |
|
607 | if (null === $documentArray) { |
|
608 | return null; |
|
609 | } |
|
610 | ||
611 | return $this->hydrate($documentArray, $useDocumentPool); |
|
612 | } |
|
613 | ||
614 | /** |
|
615 | * Get document by id directly omitting cache |
@@ 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 |