10 'Wed, 13 Oct 2010 10:26:00 GMT',
11 'Wednesday, 13-Oct-10 10:26:00 GMT',
12 'Wed Oct 13 10:26:00 2010',
15 $expected = 1286965560;
17 foreach ($times as
$time) {
19 $this->assertEquals($expected,
$result->format(
'U'));
23 $this->assertEquals(1286360760, $result->format(
'U'));
33 'Wednesday, 13-Oct-10 10:26:00 UTC',
35 'Wed Oct 6 10:26:00 2010',
37 'Wed Oct 0 10:26:00 2010',
38 'Wed Oct 32 10:26:00 2010',
39 'Wed, 0 Oct 2010 10:26:00 GMT',
40 'Wed, 32 Oct 2010 10:26:00 GMT',
41 'Wednesday, 32-Oct-10 10:26:00 GMT',
43 'Wed, 13 Oct 2010 24:26:00 GMT',
44 'Wednesday, 13-Oct-10 24:26:00 GMT',
45 'Wed Oct 13 24:26:00 2010',
48 foreach ($times as
$time) {
56 $default = date_default_timezone_get();
57 date_default_timezone_set(
'Europe/Amsterdam');
67 $dt = new \DateTime(
'2011-12-10 12:00:00 +0200');
70 'Sat, 10 Dec 2011 10:00:00 GMT',
103 [
'application/xml',
'application/json'],
107 'application/json, application/xml',
112 'application/xml;q=0.2, application/json',
113 [
'application/xml',
'application/json'],
117 'image/jpeg, image/png, */*',
118 [
'application/xml',
'application/json'],
122 'image/jpeg, image/png; q=0.5, */*',
123 [
'application/xml',
'application/json',
'image/png'],
132 'text/vcard; version=4.0',
140 'text/vcard; version=4.0',
142 'text/vcard; version=3.0',
144 'application/vcard+json',
146 'text/vcard; version=4.0',
150 'audio/*; q=0.2, audio/basic',
158 'audio/pcm; q=0.2, audio/basic; q=0.1',
166 'audio/pcm; hello; q=0.2, audio/basic; q=0.1',
174 'text/vcard;version=3.0, text/vcard',
177 'text/vcard; version=3.0' 179 'text/vcard; version=3.0',
182 'text/vcard, text/vcard;version=3.0',
184 'text/vcard; version=3.0',
187 'text/vcard; version=3.0',
190 'text/vcard; charset=utf-8; version=3.0, text/vcard',
193 'text/vcard; version=3.0' 195 'text/vcard; version=3.0',
198 'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2',
199 [
'application/xml',
'application/json',
'image/png'],
static negotiate($acceptHeaderValue, array $availableOptions)
Deprecated! Use negotiateContentType.
static toHTTPDate(\DateTime $dateTime)
Transforms a DateTime object to HTTP's most common date format.
testNegotiate($acceptHeader, $available, $expected)
negotiateData
static parseHTTPDate($dateHeader)
Parses a RFC2616-compatible date string.