Sokil\Mongo\Collection::stats PHP Method

stats() public method

Get collection stat
public stats ( ) : array
return array collection stat
    public function stats()
    {
        return $this->getDatabase()->executeCommand(array('collstats' => $this->getName()));
    }

Usage Example

Example #1
0
 public function testStats()
 {
     $stats = $this->collection->stats();
     // error occuned - ns not found
     $this->assertEquals((double) 0, $stats['ok']);
 }