/** * Set the read preference for this collection * * @param string $readPreference * @param array $tags * * @return bool */ public function setReadPreference($readPreference, array $tags = null) { if ($newPreference = MongoClient::_validateReadPreference($readPreference, $tags)) { $this->readPreference = $newPreference; } return (bool) $newPreference; }