Sokil\Mongo\Collection::getWriteConcern PHP Method

getWriteConcern() public method

Get currently active write concern on all requests to collection
public getWriteConcern ( ) : integer | string
return integer | string write concern
    public function getWriteConcern()
    {
        return $this->getMongoCollection()->getWriteConcern();
    }

Usage Example

Example #1
0
 public function testSetMajorityWriteConcern()
 {
     $this->collection->setMajorityWriteConcern(13000);
     $this->assertEquals(array('w' => 'majority', 'wtimeout' => 13000), $this->collection->getWriteConcern());
 }