Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 991 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 991 Revision 1464
Zeile 1... Zeile 1...
1
<?php
1
<?php
Zeile 2... Zeile -...
2
 
-
 
3
declare(strict_types=1);
-
 
4
 
2
 
Zeile 5... Zeile 3...
5
namespace Psr\Http\Message;
3
namespace Psr\Http\Message;
6
 
4
 
7
/**
5
/**
Zeile 23... Zeile 21...
23
     *
21
     *
24
     * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
22
     * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
25
     *
23
     *
26
     * @return string HTTP protocol version.
24
     * @return string HTTP protocol version.
27
     */
25
     */
28
    public function getProtocolVersion();
26
    public function getProtocolVersion(): string;
Zeile 29... Zeile 27...
29
 
27
 
30
    /**
28
    /**
31
     * Return an instance with the specified HTTP protocol version.
29
     * Return an instance with the specified HTTP protocol version.
32
     *
30
     *
Zeile 38... Zeile 36...
38
     * new protocol version.
36
     * new protocol version.
39
     *
37
     *
40
     * @param string $version HTTP protocol version
38
     * @param string $version HTTP protocol version
41
     * @return static
39
     * @return static
42
     */
40
     */
43
    public function withProtocolVersion(string $version);
41
    public function withProtocolVersion(string $version): MessageInterface;
Zeile 44... Zeile 42...
44
 
42
 
45
    /**
43
    /**
46
     * Retrieves all message header values.
44
     * Retrieves all message header values.
47
     *
45
     *
Zeile 65... Zeile 63...
65
     *
63
     *
66
     * @return string[][] Returns an associative array of the message's headers. Each
64
     * @return string[][] Returns an associative array of the message's headers. Each
67
     *     key MUST be a header name, and each value MUST be an array of strings
65
     *     key MUST be a header name, and each value MUST be an array of strings
68
     *     for that header.
66
     *     for that header.
69
     */
67
     */
70
    public function getHeaders();
68
    public function getHeaders(): array;
Zeile 71... Zeile 69...
71
 
69
 
72
    /**
70
    /**
73
     * Checks if a header exists by the given case-insensitive name.
71
     * Checks if a header exists by the given case-insensitive name.
74
     *
72
     *
75
     * @param string $name Case-insensitive header field name.
73
     * @param string $name Case-insensitive header field name.
76
     * @return bool Returns true if any header names match the given header
74
     * @return bool Returns true if any header names match the given header
77
     *     name using a case-insensitive string comparison. Returns false if
75
     *     name using a case-insensitive string comparison. Returns false if
78
     *     no matching header name is found in the message.
76
     *     no matching header name is found in the message.
79
     */
77
     */
Zeile 80... Zeile 78...
80
    public function hasHeader(string $name);
78
    public function hasHeader(string $name): bool;
81
 
79
 
82
    /**
80
    /**
83
     * Retrieves a message header value by the given case-insensitive name.
81
     * Retrieves a message header value by the given case-insensitive name.
Zeile 91... Zeile 89...
91
     * @param string $name Case-insensitive header field name.
89
     * @param string $name Case-insensitive header field name.
92
     * @return string[] An array of string values as provided for the given
90
     * @return string[] An array of string values as provided for the given
93
     *    header. If the header does not appear in the message, this method MUST
91
     *    header. If the header does not appear in the message, this method MUST
94
     *    return an empty array.
92
     *    return an empty array.
95
     */
93
     */
96
    public function getHeader(string $name);
94
    public function getHeader(string $name): array;
Zeile 97... Zeile 95...
97
 
95
 
98
    /**
96
    /**
99
     * Retrieves a comma-separated string of the values for a single header.
97
     * Retrieves a comma-separated string of the values for a single header.
100
     *
98
     *
Zeile 112... Zeile 110...
112
     * @param string $name Case-insensitive header field name.
110
     * @param string $name Case-insensitive header field name.
113
     * @return string A string of values as provided for the given header
111
     * @return string A string of values as provided for the given header
114
     *    concatenated together using a comma. If the header does not appear in
112
     *    concatenated together using a comma. If the header does not appear in
115
     *    the message, this method MUST return an empty string.
113
     *    the message, this method MUST return an empty string.
116
     */
114
     */
117
    public function getHeaderLine(string $name);
115
    public function getHeaderLine(string $name): string;
Zeile 118... Zeile 116...
118
 
116
 
119
    /**
117
    /**
120
     * Return an instance with the provided value replacing the specified header.
118
     * Return an instance with the provided value replacing the specified header.
121
     *
119
     *
Zeile 129... Zeile 127...
129
     * @param string $name Case-insensitive header field name.
127
     * @param string $name Case-insensitive header field name.
130
     * @param string|string[] $value Header value(s).
128
     * @param string|string[] $value Header value(s).
131
     * @return static
129
     * @return static
132
     * @throws \InvalidArgumentException for invalid header names or values.
130
     * @throws \InvalidArgumentException for invalid header names or values.
133
     */
131
     */
134
    public function withHeader(string $name, $value);
132
    public function withHeader(string $name, $value): MessageInterface;
Zeile 135... Zeile 133...
135
 
133
 
136
    /**
134
    /**
137
     * Return an instance with the specified header appended with the given value.
135
     * Return an instance with the specified header appended with the given value.
138
     *
136
     *
Zeile 147... Zeile 145...
147
     * @param string $name Case-insensitive header field name to add.
145
     * @param string $name Case-insensitive header field name to add.
148
     * @param string|string[] $value Header value(s).
146
     * @param string|string[] $value Header value(s).
149
     * @return static
147
     * @return static
150
     * @throws \InvalidArgumentException for invalid header names or values.
148
     * @throws \InvalidArgumentException for invalid header names or values.
151
     */
149
     */
152
    public function withAddedHeader(string $name, $value);
150
    public function withAddedHeader(string $name, $value): MessageInterface;
Zeile 153... Zeile 151...
153
 
151
 
154
    /**
152
    /**
155
     * Return an instance without the specified header.
153
     * Return an instance without the specified header.
156
     *
154
     *
Zeile 161... Zeile 159...
161
     * the named header.
159
     * the named header.
162
     *
160
     *
163
     * @param string $name Case-insensitive header field name to remove.
161
     * @param string $name Case-insensitive header field name to remove.
164
     * @return static
162
     * @return static
165
     */
163
     */
166
    public function withoutHeader(string $name);
164
    public function withoutHeader(string $name): MessageInterface;
Zeile 167... Zeile 165...
167
 
165
 
168
    /**
166
    /**
169
     * Gets the body of the message.
167
     * Gets the body of the message.
170
     *
168
     *
171
     * @return StreamInterface Returns the body as a stream.
169
     * @return StreamInterface Returns the body as a stream.
172
     */
170
     */
Zeile 173... Zeile 171...
173
    public function getBody();
171
    public function getBody(): StreamInterface;
174
 
172
 
175
    /**
173
    /**
176
     * Return an instance with the specified message body.
174
     * Return an instance with the specified message body.
Zeile 183... Zeile 181...
183
     *
181
     *
184
     * @param StreamInterface $body Body.
182
     * @param StreamInterface $body Body.
185
     * @return static
183
     * @return static
186
     * @throws \InvalidArgumentException When the body is not valid.
184
     * @throws \InvalidArgumentException When the body is not valid.
187
     */
185
     */
188
    public function withBody(StreamInterface $body);
186
    public function withBody(StreamInterface $body): MessageInterface;
189
}
187
}