public readPrimaryPreferred ( array $tags = null ) | ||
$tags | array |
public function readPrimaryPreferred(array $tags = null)
{
$this->getMongoClient()->setReadPreference(\MongoClient::RP_PRIMARY_PREFERRED, $tags);
return $this;
}
public function testReadPrimaryPreferred() { $this->client->readPrimaryPreferred(array(array('dc' => 'kyiv'), array('dc' => 'lviv'))); $this->assertEquals(array('type' => \MongoClient::RP_PRIMARY_PREFERRED, 'tagsets' => array(array('dc' => 'kyiv'), array('dc' => 'lviv'))), $this->client->getReadPreference()); }