public function getParam($key)
    {
        if (!$this->hasParam($key)) {
            return null;
        }

        $param = $this->getDefaultParams()[$key];
        $value = null;
        if (isset($this->_parameters[$key])) {
            $value = $this->_parameters[$key];

            if (!is_array($value) || !array_key_exists('value', $value)) {
                throw new MalformedParameterException(sprintf('Parameter %s is malformed.', $key));
            }
        }

        if (is_array($value) && isset($value['value'])) {
            $param['value'] = $value['value'];
        }

        return $param;
    }
public function getParam($key)
    {
        if (!$this->hasParam($key)) {
            return null;
        }

        $param = $this->getDefaultParams()[$key];
        $value = null;
        if (isset($this->_parameters[$key])) {
            $value = $this->_parameters[$key];

            if (!is_array($value) || !array_key_exists('value', $value)) {
                throw new MalformedParameterException(sprintf('Parameter %s is malformed.', $key));
            }
        }

        if (is_array($value) && isset($value['value'])) {
            $param['value'] = $value['value'];
        }

        return $param;
    }
public function getParam ( $ key ) { if ( ! $ this -> hasParam ( $ key ) ) { return null ; } $ param = $ this -> getDefaultParams ( ) [ $ key ] ; $ value = null ; if ( isset ( $ this -> _parameters [ $ key ] ) ) { $ value = $ this -> _parameters [ $ key ] ; if ( ! is_array ( $ value ) || ! array_key_exists ( 'value' , $ value ) ) { throw new MalformedParameterException ( sprintf ( 'Parameter %s is malformed.' , $ key ) ) ; } } if ( is_array ( $ value ) && isset ( $ value [ 'value' ] ) ) { $ param [ 'value' ] = $ value [ 'value' ] ; } return $ param ; }
Returns parameters if requested key exist.

@param string $key The parameter to be return, if NULL, all parameters are returned

@return null|array The parameter value or NULL if unfound
@throws MalformedParameterException Raises if the parameter is malformed.
Returns parameters if requested key exist .