src/Koldy/Http/Request.php
public function setParam(string $name, $value): Request
    {
        if (is_object($value)) {
            if (property_exists($value, '__toString')) {
                $value = $value->__toString();
            } else {
                $class = get_class($value);
                throw new HttpException("Can not set param={$name} when instance of {$class} can't be converted to string");
            }
        }

        $this->params[$name] = $value;
        return $this;
    }
public function setParam(string $name, $value): Request
    {
        if (is_object($value)) {
            if (property_exists($value, '__toString')) {
                $value = $value->__toString();
            } else {
                $class = get_class($value);
                throw new HttpException("Can not set param={$name} when instance of {$class} can't be converted to string");
            }
        }

        $this->params[$name] = $value;
        return $this;
    }
public function setParam ( string $ name , $ value ) : Request { if ( is_object ( $ value ) ) { if ( property_exists ( $ value , '__toString' ) ) { $ value = $ value -> __toString ( ) ; } else { $ class = get_class ( $ value ) ; throw new HttpException ( "Can not set param={$name} when instance of {$class} can't be converted to string" ) ; } } $ this -> params [ $ name ] = $ value ; return $ this ; }
Set the request parameter

@param string $name
@param mixed $value

@return Request
@throws Exception
Set the request parameter