public static function validateMethod($method)
    {
        if ($method === self::METHOD_POST ||
            $method === self::METHOD_PUT ||
            $method === self::METHOD_DELETE ||
            $method === self::METHOD_GET ||
            $method === self::METHOD_HEAD ||
            $method === self::METHOD_PATCH
        ) {
            return true;
        }

        throw new ClientException('Invalid request method \'' . $method . '\'');
    }
public static function validateMethod($method)
    {
        if ($method === self::METHOD_POST ||
            $method === self::METHOD_PUT ||
            $method === self::METHOD_DELETE ||
            $method === self::METHOD_GET ||
            $method === self::METHOD_HEAD ||
            $method === self::METHOD_PATCH
        ) {
            return true;
        }

        throw new ClientException('Invalid request method \'' . $method . '\'');
    }
public static function validateMethod ( $ method ) { if ( $ method === self :: METHOD_POST || $ method === self :: METHOD_PUT || $ method === self :: METHOD_DELETE || $ method === self :: METHOD_GET || $ method === self :: METHOD_HEAD || $ method === self :: METHOD_PATCH ) { return true ; } throw new ClientException ( 'Invalid request method \'' . $ method . '\'' ) ; }
Validate an HTTP request method name

@throws ClientException

@param string $method - method name

@return bool - always true, will throw if an invalid method name is supplied
Validate an HTTP request method name