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