static function MethodArray(RequestMethod $method, $name = '')
    {
        switch ($method)
        {
            case RequestMethod::Get():
                return self::GetArray($name);
            
            case RequestMethod::Post():
                return self::PostArray($name);
            
            default:
                throw new \InvalidArgumentException('Request::MethodArray is available for request methods POST and GET, only');
        }
    }
static function MethodArray(RequestMethod $method, $name = '')
    {
        switch ($method)
        {
            case RequestMethod::Get():
                return self::GetArray($name);
            
            case RequestMethod::Post():
                return self::PostArray($name);
            
            default:
                throw new \InvalidArgumentException('Request::MethodArray is available for request methods POST and GET, only');
        }
    }
static function MethodArray ( RequestMethod $ method , $ name = '' ) { switch ( $ method ) { case RequestMethod :: Get ( ) : return self :: GetArray ( $ name ) ; case RequestMethod :: Post ( ) : return self :: PostArray ( $ name ) ; default : throw new \ InvalidArgumentException ( 'Request::MethodArray is available for request methods POST and GET, only' ) ; } }
Returns GET or POST data array
@param RequestMethod $method The request method
@param string $name Optional parameter name
@return array Returns either the full request array or an array filtered by name
@throws \InvalidArgumentException Raises an error if method is neither post nor get
Returns GET or POST data array