MediaWiki
master
ResponseHeaders.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\Rest
;
4
9
class
ResponseHeaders
{
10
15
public
const
CACHE_CONTROL
=
'Cache-Control'
;
16
public
const
CONTENT_LANGUAGE
=
'Content-Language'
;
17
public
const
CONTENT_TYPE
=
'Content-Type'
;
18
public
const
DEPRECATION
=
'Deprecation'
;
19
public
const
ETAG
=
'ETag'
;
20
public
const
EXPIRES
=
'Expires'
;
21
public
const
LAST_MODIFIED
=
'Last-Modified'
;
22
public
const
LINK
=
'Link'
;
23
public
const
LOCATION
=
'Location'
;
24
public
const
MEDIAWIKI_REVISION_ID
=
'X-MediaWiki-Revision-Id'
;
25
public
const
REQUEST_ID
=
'X-Request-Id'
;
26
public
const
VARY
=
'Vary'
;
27
31
public
const
RESPONSE_HEADER_DEFINITIONS
= [
32
self::CACHE_CONTROL => [
33
'messageKey'
=>
'rest-responseheader-desc-cachecontrol'
,
34
'schema'
=> [
35
'type'
=>
'string'
36
]
37
],
38
self::CONTENT_LANGUAGE => [
39
'messageKey'
=>
'rest-responseheader-desc-contentlanguage'
,
40
'schema'
=> [
41
'type'
=>
'string'
42
]
43
],
44
self::CONTENT_TYPE => [
45
'messageKey'
=>
'rest-responseheader-desc-contenttype'
,
46
'schema'
=> [
47
'type'
=>
'string'
48
]
49
],
50
self::DEPRECATION => [
51
'messageKey'
=>
'rest-responseheader-desc-deprecation'
,
52
'schema'
=> [
53
'type'
=>
'string'
54
]
55
],
56
self::ETAG => [
57
'messageKey'
=>
'rest-responseheader-desc-etag'
,
58
'schema'
=> [
59
'type'
=>
'string'
60
]
61
],
62
self::EXPIRES => [
63
'messageKey'
=>
'rest-responseheader-desc-expires'
,
64
'schema'
=> [
65
'type'
=>
'string'
,
66
'format'
=>
'date-time'
67
]
68
],
69
self::LAST_MODIFIED => [
70
'messageKey'
=>
'rest-responseheader-desc-lastmodified'
,
71
'schema'
=> [
72
'type'
=>
'string'
,
73
'format'
=>
'date-time'
74
]
75
],
76
self::LINK => [
77
'messageKey'
=>
'rest-responseheader-desc-link'
,
78
'schema'
=> [
79
'type'
=>
'string'
,
80
]
81
],
82
self::LOCATION => [
83
'messageKey'
=>
'rest-responseheader-desc-location'
,
84
'schema'
=> [
85
'type'
=>
'string'
,
86
]
87
],
88
self::MEDIAWIKI_REVISION_ID => [
89
'messageKey'
=>
'rest-responseheader-desc-mediawikirevisionid'
,
90
'schema'
=> [
91
'type'
=>
'string'
92
]
93
],
94
self::REQUEST_ID => [
95
'messageKey'
=>
'rest-responseheader-desc-requestid'
,
96
'schema'
=> [
97
'type'
=>
'string'
98
]
99
],
100
self::VARY => [
101
'messageKey'
=>
'rest-responseheader-desc-vary'
,
102
'schema'
=> [
103
'type'
=>
'string'
104
]
105
]
106
];
107
108
private
function
__construct() {
109
}
110
}
MediaWiki\Rest\ResponseHeaders
Central definition of HTTP response headers and their OpenAPI schemas for REST Handlers.
Definition
ResponseHeaders.php:9
MediaWiki\Rest\ResponseHeaders\EXPIRES
const EXPIRES
Definition
ResponseHeaders.php:20
MediaWiki\Rest\ResponseHeaders\REQUEST_ID
const REQUEST_ID
Definition
ResponseHeaders.php:25
MediaWiki\Rest\ResponseHeaders\ETAG
const ETAG
Definition
ResponseHeaders.php:19
MediaWiki\Rest\ResponseHeaders\CONTENT_TYPE
const CONTENT_TYPE
Definition
ResponseHeaders.php:17
MediaWiki\Rest\ResponseHeaders\LOCATION
const LOCATION
Definition
ResponseHeaders.php:23
MediaWiki\Rest\ResponseHeaders\VARY
const VARY
Definition
ResponseHeaders.php:26
MediaWiki\Rest\ResponseHeaders\LAST_MODIFIED
const LAST_MODIFIED
Definition
ResponseHeaders.php:21
MediaWiki\Rest\ResponseHeaders\LINK
const LINK
Definition
ResponseHeaders.php:22
MediaWiki\Rest\ResponseHeaders\DEPRECATION
const DEPRECATION
Definition
ResponseHeaders.php:18
MediaWiki\Rest\ResponseHeaders\CACHE_CONTROL
const CACHE_CONTROL
Header name constants.
Definition
ResponseHeaders.php:15
MediaWiki\Rest\ResponseHeaders\RESPONSE_HEADER_DEFINITIONS
const RESPONSE_HEADER_DEFINITIONS
OpenAPI response header definitions for descriptions and schemas.
Definition
ResponseHeaders.php:31
MediaWiki\Rest\ResponseHeaders\MEDIAWIKI_REVISION_ID
const MEDIAWIKI_REVISION_ID
Definition
ResponseHeaders.php:24
MediaWiki\Rest\ResponseHeaders\CONTENT_LANGUAGE
const CONTENT_LANGUAGE
Definition
ResponseHeaders.php:16
MediaWiki\Rest
includes
Rest
ResponseHeaders.php
Generated on Sat Apr 18 2026 00:08:18 for MediaWiki by
1.10.0