function limit( $count, $offset = null ) {

        if ( $this->parent_ ) {

            throw new \LogicException( 'Cannot limit referenced result' );

        }

        $clone = clone $this;

        $clone->limitCount = $count;
        $clone->limitOffset = $offset;

        return $clone;

    }
function limit( $count, $offset = null ) {

        if ( $this->parent_ ) {

            throw new \LogicException( 'Cannot limit referenced result' );

        }

        $clone = clone $this;

        $clone->limitCount = $count;
        $clone->limitOffset = $offset;

        return $clone;

    }
function limit ( $ count , $ offset = null ) { if ( $ this -> parent_ ) { throw new \ LogicException ( 'Cannot limit referenced result' ) ; } $ clone = clone $ this ; $ clone -> limitCount = $ count ; $ clone -> limitOffset = $ offset ; return $ clone ; }
Set a result limit and optionally an offset

@param int $count
@param int|null $offset
@return $this
Set a result limit and optionally an offset