@@ 711-713 (lines=3) @@ | ||
708 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
709 | $cursor->slaveOkay(true); |
|
710 | } |
|
711 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
712 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
713 | } |
|
714 | $documents = $cursor->toArray(false); |
|
715 | foreach ($documents as $documentData) { |
|
716 | $document = $this->uow->getById($documentData['_id'], $class); |
|
@@ 771-773 (lines=3) @@ | ||
768 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
769 | $qb->slaveOkay(true); |
|
770 | } |
|
771 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
772 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
773 | } |
|
774 | ||
775 | return $qb->getQuery(); |
|
776 | } |
|
@@ 820-822 (lines=3) @@ | ||
817 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
818 | $cursor->slaveOkay(true); |
|
819 | } |
|
820 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
821 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
822 | } |
|
823 | ||
824 | return $cursor; |
|
825 | } |
@@ 82-84 (lines=3) @@ | ||
79 | $qb->slaveOkay(true); |
|
80 | } |
|
81 | ||
82 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
83 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
84 | } |
|
85 | ||
86 | $qb->getQuery()->execute()->toArray(false); |
|
87 | }; |