| @@ 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 | }; |
|
| @@ 719-721 (lines=3) @@ | ||
| 716 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
| 717 | $cursor->slaveOkay(true); |
|
| 718 | } |
|
| 719 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 720 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 721 | } |
|
| 722 | $documents = $cursor->toArray(false); |
|
| 723 | foreach ($documents as $documentData) { |
|
| 724 | $document = $this->uow->getById($documentData['_id'], $class); |
|
| @@ 779-781 (lines=3) @@ | ||
| 776 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
| 777 | $qb->slaveOkay(true); |
|
| 778 | } |
|
| 779 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 780 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 781 | } |
|
| 782 | ||
| 783 | return $qb->getQuery(); |
|
| 784 | } |
|
| @@ 829-831 (lines=3) @@ | ||
| 826 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
| 827 | $cursor->slaveOkay(true); |
|
| 828 | } |
|
| 829 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 830 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 831 | } |
|
| 832 | ||
| 833 | return $cursor; |
|
| 834 | } |
|