1 | <?php |
||
7 | final class CookieUtil |
||
8 | { |
||
9 | /** |
||
10 | * Handles dates as defined by RFC 2616 section 3.3.1, and also some other |
||
11 | * non-standard, but common formats. |
||
12 | * |
||
13 | * @var array |
||
14 | */ |
||
15 | private static $dateFormats = [ |
||
16 | 'D, d M y H:i:s T', |
||
17 | 'D, d M Y H:i:s T', |
||
18 | 'D, d-M-y H:i:s T', |
||
19 | 'D, d-M-Y H:i:s T', |
||
20 | 'D, d-m-y H:i:s T', |
||
21 | 'D, d-m-Y H:i:s T', |
||
22 | 'D M j G:i:s Y', |
||
23 | 'D M d H:i:s Y T', |
||
24 | ]; |
||
25 | |||
26 | /** |
||
27 | * @see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/BrowserKit/Cookie.php |
||
28 | * |
||
29 | * @param string $dateValue |
||
30 | * |
||
31 | * @return \DateTime |
||
32 | * |
||
33 | * @throws UnexpectedValueException if we cannot parse the cookie date string. |
||
34 | */ |
||
35 | 24 | public static function parseDate($dateValue) |
|
53 | } |
||
54 |