Sokil\Mongo\Pipeline::skip PHP Method

skip() public method

public skip ( $skip )
    public function skip($skip)
    {
        $this->addStage('$skip', (int) $skip);
        return $this;
    }

Usage Example

示例#1
0
 public function testSkipReset()
 {
     $pipeline = new Pipeline($this->collection);
     $pipeline->skip(11)->match(array('a' => 1, 'b' => array('$lt' => 12)))->skip(23);
     $this->assertEquals('[{"$skip":11},{"$match":{"a":1,"b":{"$lt":12}}},{"$skip":23}]', (string) $pipeline);
 }