Imbo\Resource\Images\Query::limit PHP Method

limit() public method

Set or get the limit property
public limit ( integer $limit = null ) : integer | self
$limit integer Give this a value to set the limit property
return integer | self
    public function limit($limit = null)
    {
        if ($limit === null) {
            return $this->limit;
        }
        $this->limit = (int) $limit;
        return $this;
    }

Usage Example

Example #1
0
 /**
  * @covers Imbo\Resource\Images\Query::limit
  */
 public function testLimit()
 {
     $value = 30;
     $this->assertSame(20, $this->query->limit());
     $this->assertSame($this->query, $this->query->limit($value));
     $this->assertSame($value, $this->query->limit());
 }
All Usage Examples Of Imbo\Resource\Images\Query::limit