public function getParam($name, $default = null)
    {
        if (\is_array($this->params)) {
            // Check in params that are arrays or implement array access
            return $this->params[$name] ?? $default;
        } elseif (\is_object($this->params)) {
            // Check in normal objects
            return $this->params->{$name} ?? $default;
        } else {
            // Wrong type, return default value
            return $default;
        }
    }
public function getParam($name, $default = null)
    {
        if (\is_array($this->params)) {
            // Check in params that are arrays or implement array access
            return $this->params[$name] ?? $default;
        } elseif (\is_object($this->params)) {
            // Check in normal objects
            return $this->params->{$name} ?? $default;
        } else {
            // Wrong type, return default value
            return $default;
        }
    }
public function getParam ( $ name , $ default = null ) { if ( \ is_array ( $ this -> params ) ) { // Check in params that are arrays or implement array access return $ this -> params [ $ name ] ?? $ default ; } elseif ( \ is_object ( $ this -> params ) ) { // Check in normal objects return $ this -> params -> { $ name } ?? $ default ; } else { // Wrong type, return default value return $ default ; } }
Get an individual parameter

If the parameter does not exist, the $default value will be returned.

@param  string|int $name
@param  mixed      $default

@return mixed
Get an individual parameter