| @@ 84-86 (lines=3) @@ | ||
| 81 | $qb->slaveOkay(true); |
|
| 82 | } |
|
| 83 | ||
| 84 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 85 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 86 | } |
|
| 87 | ||
| 88 | $qb->getQuery()->execute()->toArray(false); |
|
| 89 | }; |
|
| @@ 766-768 (lines=3) @@ | ||
| 763 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
| 764 | $cursor->slaveOkay(true); |
|
| 765 | } |
|
| 766 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 767 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 768 | } |
|
| 769 | $documents = $cursor->toArray(false); |
|
| 770 | foreach ($documents as $documentData) { |
|
| 771 | $document = $this->uow->getById($documentData['_id'], $class); |
|
| @@ 826-828 (lines=3) @@ | ||
| 823 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
| 824 | $qb->slaveOkay(true); |
|
| 825 | } |
|
| 826 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 827 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 828 | } |
|
| 829 | ||
| 830 | return $qb->getQuery(); |
|
| 831 | } |
|
| @@ 876-878 (lines=3) @@ | ||
| 873 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
| 874 | $cursor->slaveOkay(true); |
|
| 875 | } |
|
| 876 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
| 877 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
| 878 | } |
|
| 879 | ||
| 880 | return $cursor; |
|
| 881 | } |
|