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