| @@ 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 | } |
|
| @@ 709-711 (lines=3) @@ | ||
| 706 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
| 707 | $cursor->slaveOkay(true); |
|
| 708 | } |
|
| 709 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 710 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 711 | } |
|
| 712 | $documents = $cursor->toArray(false); |
|
| 713 | foreach ($documents as $documentData) { |
|
| 714 | $document = $this->uow->getById($documentData['_id'], $class); |
|
| @@ 769-771 (lines=3) @@ | ||
| 766 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
| 767 | $qb->slaveOkay(true); |
|
| 768 | } |
|
| 769 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 770 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 771 | } |
|
| 772 | ||
| 773 | return $qb->getQuery(); |
|
| 774 | } |
|
| @@ 81-83 (lines=3) @@ | ||
| 78 | $qb->slaveOkay(true); |
|
| 79 | } |
|
| 80 | ||
| 81 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 82 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 83 | } |
|
| 84 | ||
| 85 | $qb->getQuery()->execute()->toArray(false); |
|
| 86 | }; |
|