private function setLimit($limit = self::NO_LIMIT)
    {
        if (! is_int($limit)) {
            throw new Exceptions\InvalidIntegerType(gettype($limit));
        }

        // A limit of 0 or less is useless, fallback to no limit
        if ($limit !== self::NO_LIMIT && $limit <= 0) {
            throw new Exceptions\PositiveIntegerRequired($limit);
        }

        $this->limit = $limit;
    }
private function setLimit($limit = self::NO_LIMIT)
    {
        if (! is_int($limit)) {
            throw new Exceptions\InvalidIntegerType(gettype($limit));
        }

        // A limit of 0 or less is useless, fallback to no limit
        if ($limit !== self::NO_LIMIT && $limit <= 0) {
            throw new Exceptions\PositiveIntegerRequired($limit);
        }

        $this->limit = $limit;
    }
private function setLimit ( $ limit = self :: NO_LIMIT ) { if ( ! is_int ( $ limit ) ) { throw new Exceptions \ InvalidIntegerType ( gettype ( $ limit ) ) ; } // A limit of 0 or less is useless, fallback to no limit if ( $ limit !== self :: NO_LIMIT && $ limit <= 0 ) { throw new Exceptions \ PositiveIntegerRequired ( $ limit ) ; } $ this -> limit = $ limit ; }
Stores the limit.
@param int $limit
@throws Exceptions\InvalidIntegerType
@throws Exceptions\PositiveIntegerRequired
Stores the limit .