MongoDB\Driver\WriteConcern::__construct
MongoDB\Driver\ReadPreference::__construct
MongoDB\Driver
PHP Manual

# The MongoDB\Driver\ReadPreference class

(mongodb >=0.2.0)

## Introduction

## Class synopsis

final MongoDB\Driver\ReadPreference {
/* Constants */
const integer RP_PRIMARY = 1 ;
const integer RP_PRIMARY_PREFERRED = 5 ;
const integer RP_SECONDARY = 2 ;
const integer RP_SECONDARY_PREFERRED = 6 ;
const integer RP_NEAREST = 10 ;
/* Methods */
final public __construct ( string `$readPreference` [, array `$tagSets` ] )
}

## Predefined Constants

`MongoDB\Driver\ReadPreference::RP_PRIMARY`

`MongoDB\Driver\ReadPreference::RP_PRIMARY_PREFERRED`

`MongoDB\Driver\ReadPreference::RP_SECONDARY`

`MongoDB\Driver\ReadPreference::RP_SECONDARY_PREFERRED`

`MongoDB\Driver\ReadPreference::RP_NEAREST`

## Table of Contents

- MongoDB\Driver\ReadPreference::__construct — Description

MongoDB\Driver\WriteConcern::__construct
MongoDB\Driver\ReadPreference::__construct
MongoDB\Driver
PHP Manual