1<?php
2
3namespace Sabre\HTTP;
4
5/**
6 * HTTP utility methods
7 *
8 * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
9 * @author Evert Pot (http://evertpot.com/)
10 * @author Paul Voegler
11 * @deprecated All these functions moved to functions.php
12 * @license http://sabre.io/license/ Modified BSD License
13 */
14class Util {
15
16    /**
17     * Content negotiation
18     *
19     * @deprecated Use \Sabre\HTTP\negotiateContentType
20     * @param string|null $acceptHeaderValue
21     * @param array $availableOptions
22     * @return string|null
23     */
24    static function negotiateContentType($acceptHeaderValue, array $availableOptions) {
25
26        return negotiateContentType($acceptHeaderValue, $availableOptions);
27
28    }
29
30    /**
31     * Deprecated! Use negotiateContentType.
32     *
33     * @deprecated Use \Sabre\HTTP\NegotiateContentType
34     * @param string|null $acceptHeaderValue
35     * @param array $availableOptions
36     * @return string|null
37     */
38    static function negotiate($acceptHeaderValue, array $availableOptions) {
39
40        return negotiateContentType($acceptHeaderValue, $availableOptions);
41
42    }
43
44    /**
45     * Parses a RFC2616-compatible date string
46     *
47     * This method returns false if the date is invalid
48     *
49     * @deprecated Use parseDate
50     * @param string $dateHeader
51     * @return bool|DateTime
52     */
53    static function parseHTTPDate($dateHeader) {
54
55        return parseDate($dateHeader);
56
57    }
58
59    /**
60     * Transforms a DateTime object to HTTP's most common date format.
61     *
62     * We're serializing it as the RFC 1123 date, which, for HTTP must be
63     * specified as GMT.
64     *
65     * @deprecated Use toDate
66     * @param \DateTime $dateTime
67     * @return string
68     */
69    static function toHTTPDate(\DateTime $dateTime) {
70
71        return toDate($dateTime);
72
73    }
74}
75