Doctrine\MongoDB\Query\Builder::slaveOkay PHP Method

slaveOkay() public method

If the driver supports read preferences and slaveOkay is true, a "secondaryPreferred" read preference will be used. Otherwise, a "primary" read preference will be used.
See also: Doctrine\MongoDB\Cursor::setMongoCursorSlaveOkay()
public slaveOkay ( boolean $bool = true )
$bool boolean
    public function slaveOkay($bool = true)
    {
        $this->query['slaveOkay'] = (bool) $bool;
        return $this;
    }