public function param($name, $default = null)
    {
        if(!$this->params)
            $this->params = $this->getMethod() == 'GET' ? $this->getQueryParams() : array_merge($this->getQueryParams(), $this->getParsedBody());

        return array_key_exists($name, $this->params) ? $this->params[$name] : $default;
    }
public function param($name, $default = null)
    {
        if(!$this->params)
            $this->params = $this->getMethod() == 'GET' ? $this->getQueryParams() : array_merge($this->getQueryParams(), $this->getParsedBody());

        return array_key_exists($name, $this->params) ? $this->params[$name] : $default;
    }
public function param ( $ name , $ default = null ) { if ( ! $ this -> params ) $ this -> params = $ this -> getMethod ( ) == 'GET' ? $ this -> getQueryParams ( ) : array_merge ( $ this -> getQueryParams ( ) , $ this -> getParsedBody ( ) ) ; return array_key_exists ( $ name , $ this -> params ) ? $ this -> params [ $ name ] : $ default ; }
Get a merged query params and parsed body
@param string $name
@param null|string $default
@return mixed|string
Get a merged query params and parsed body