public function setLimits($limits)
    {
        if (is_array($limits)) {
            if ((int) key($limits) === 0) {
                $this->limits = array_combine($limits, $limits);
            } else {
                $this->limits = $limits;
            }
        } elseif (is_int($limits)) {
            $this->limits = [$limits => (string) $limits];
        } else {
            throw new \InvalidArgumentException(self::NOT_VALID_LIMIT_EX_MSG);
        }

        return $this;
    }
public function setLimits($limits)
    {
        if (is_array($limits)) {
            if ((int) key($limits) === 0) {
                $this->limits = array_combine($limits, $limits);
            } else {
                $this->limits = $limits;
            }
        } elseif (is_int($limits)) {
            $this->limits = [$limits => (string) $limits];
        } else {
            throw new \InvalidArgumentException(self::NOT_VALID_LIMIT_EX_MSG);
        }

        return $this;
    }
public function setLimits ( $ limits ) { if ( is_array ( $ limits ) ) { if ( ( int ) key ( $ limits ) === 0 ) { $ this -> limits = array_combine ( $ limits , $ limits ) ; } else { $ this -> limits = $ limits ; } } elseif ( is_int ( $ limits ) ) { $ this -> limits = [ $ limits => ( string ) $ limits ] ; } else { throw new \ InvalidArgumentException ( self :: NOT_VALID_LIMIT_EX_MSG ) ; } return $ this ; }
Sets Limits.

@param mixed $limits e.g. 10, array(10, 1000) or array(10 => '10', 1000 => '1000')

@throws \InvalidArgumentException

@return self
Sets Limits .