Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
<?php
2
 
3
namespace Aws\Api;
4
 
5
/**
6
 * Priority ordered collection of supported AWS protocols.
7
 */
8
enum SupportedProtocols: string
9
{
10
    case JSON = 'json';
11
    case REST_JSON = 'rest-json';
12
    case REST_XML = 'rest-xml';
13
    case QUERY = 'query';
14
    case EC2 = 'ec2';
15
 
16
    /**
17
     * Check if a protocol is valid.
18
     *
19
     * @param string $protocol
20
     * @return bool True if the protocol is supported, otherwise false.
21
     */
22
    public static function isSupported(string $protocol): bool
23
    {
24
        return self::tryFrom($protocol) !== null;
25
    }
26
}