1 | <?php |
||
4 | trait request |
||
5 | { |
||
6 | /** |
||
7 | * Format a message to show error when client requested version is |
||
8 | * lower than the version required to intercept the response. |
||
9 | * |
||
10 | * @param string $requestedVersion The client requested version |
||
11 | * @param string $requiredVersion The minimum version required to |
||
12 | * intercept the response |
||
13 | * |
||
14 | * @return string The formatted message |
||
15 | */ |
||
16 | public static function requestVersionTooLow($requestedVersion, $requiredVersion) |
||
20 | |||
21 | /** |
||
22 | * Format a message to show error when version required to intercept |
||
23 | * the response is greater than the configured maximum protocol version. |
||
24 | * |
||
25 | * @param string $requiredVersion Required version |
||
26 | * @param string $configuredVersion Configured version |
||
27 | * |
||
28 | * @return string The formatted message |
||
29 | */ |
||
30 | public static function requestVersionIsBiggerThanProtocolVersion($requiredVersion, $configuredVersion) |
||
34 | |||
35 | /** |
||
36 | * Format a message to show error when value of DataServiceVersion or |
||
37 | * MaxDataServiceVersion is invalid. |
||
38 | * |
||
39 | * @param string $versionAsString String value of the version |
||
40 | * @param string $headerName Header name |
||
41 | * |
||
42 | * @return string The formatted message |
||
43 | */ |
||
44 | public static function requestDescriptionInvalidVersionHeader($versionAsString, $headerName) |
||
48 | |||
49 | /** |
||
50 | * Format a message to show error when value of DataServiceVersion or |
||
51 | * MaxDataServiceVersion is invalid. |
||
52 | * |
||
53 | * @param string $requestHeaderName Name of the request header |
||
54 | * @param string $requestedVersion Requested version |
||
55 | * @param string $availableVersions Available versions |
||
56 | * |
||
57 | * @return string The formatted message |
||
58 | */ |
||
59 | public static function requestDescriptionUnSupportedVersion($requestHeaderName, $requestedVersion, $availableVersions) |
||
63 | } |
||
64 |