| @@ 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 | }; |
|
| @@ 710-712 (lines=3) @@ | ||
| 707 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
| 708 | $cursor->slaveOkay(true); |
|
| 709 | } |
|
| 710 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 711 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 712 | } |
|
| 713 | $documents = $cursor->toArray(false); |
|
| 714 | foreach ($documents as $documentData) { |
|
| 715 | $document = $this->uow->getById($documentData['_id'], $class); |
|
| @@ 770-772 (lines=3) @@ | ||
| 767 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
| 768 | $qb->slaveOkay(true); |
|
| 769 | } |
|
| 770 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 771 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 772 | } |
|
| 773 | ||
| 774 | return $qb->getQuery(); |
|
| 775 | } |
|
| @@ 819-821 (lines=3) @@ | ||
| 816 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
| 817 | $cursor->slaveOkay(true); |
|
| 818 | } |
|
| 819 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 820 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 821 | } |
|
| 822 | ||
| 823 | return $cursor; |
|
| 824 | } |
|