Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 21... Línea 21...
21
     *
21
     *
22
     * 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").
23
     *
23
     *
24
     * @return string HTTP protocol version.
24
     * @return string HTTP protocol version.
25
     */
25
     */
26
    public function getProtocolVersion();
26
    public function getProtocolVersion(): string;
Línea 27... Línea 27...
27
 
27
 
28
    /**
28
    /**
29
     * Return an instance with the specified HTTP protocol version.
29
     * Return an instance with the specified HTTP protocol version.
30
     *
30
     *
Línea 36... Línea 36...
36
     * new protocol version.
36
     * new protocol version.
37
     *
37
     *
38
     * @param string $version HTTP protocol version
38
     * @param string $version HTTP protocol version
39
     * @return static
39
     * @return static
40
     */
40
     */
41
    public function withProtocolVersion($version);
41
    public function withProtocolVersion(string $version): MessageInterface;
Línea 42... Línea 42...
42
 
42
 
43
    /**
43
    /**
44
     * Retrieves all message header values.
44
     * Retrieves all message header values.
45
     *
45
     *
Línea 63... Línea 63...
63
     *
63
     *
64
     * @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
65
     *     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
66
     *     for that header.
66
     *     for that header.
67
     */
67
     */
68
    public function getHeaders();
68
    public function getHeaders(): array;
Línea 69... Línea 69...
69
 
69
 
70
    /**
70
    /**
71
     * Checks if a header exists by the given case-insensitive name.
71
     * Checks if a header exists by the given case-insensitive name.
72
     *
72
     *
73
     * @param string $name Case-insensitive header field name.
73
     * @param string $name Case-insensitive header field name.
74
     * @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
75
     *     name using a case-insensitive string comparison. Returns false if
75
     *     name using a case-insensitive string comparison. Returns false if
76
     *     no matching header name is found in the message.
76
     *     no matching header name is found in the message.
77
     */
77
     */
Línea 78... Línea 78...
78
    public function hasHeader($name);
78
    public function hasHeader(string $name): bool;
79
 
79
 
80
    /**
80
    /**
81
     * Retrieves a message header value by the given case-insensitive name.
81
     * Retrieves a message header value by the given case-insensitive name.
Línea 89... Línea 89...
89
     * @param string $name Case-insensitive header field name.
89
     * @param string $name Case-insensitive header field name.
90
     * @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
91
     *    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
92
     *    return an empty array.
92
     *    return an empty array.
93
     */
93
     */
94
    public function getHeader($name);
94
    public function getHeader(string $name): array;
Línea 95... Línea 95...
95
 
95
 
96
    /**
96
    /**
97
     * 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.
98
     *
98
     *
Línea 110... Línea 110...
110
     * @param string $name Case-insensitive header field name.
110
     * @param string $name Case-insensitive header field name.
111
     * @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
112
     *    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
113
     *    the message, this method MUST return an empty string.
113
     *    the message, this method MUST return an empty string.
114
     */
114
     */
115
    public function getHeaderLine($name);
115
    public function getHeaderLine(string $name): string;
Línea 116... Línea 116...
116
 
116
 
117
    /**
117
    /**
118
     * Return an instance with the provided value replacing the specified header.
118
     * Return an instance with the provided value replacing the specified header.
119
     *
119
     *
Línea 127... Línea 127...
127
     * @param string $name Case-insensitive header field name.
127
     * @param string $name Case-insensitive header field name.
128
     * @param string|string[] $value Header value(s).
128
     * @param string|string[] $value Header value(s).
129
     * @return static
129
     * @return static
130
     * @throws \InvalidArgumentException for invalid header names or values.
130
     * @throws \InvalidArgumentException for invalid header names or values.
131
     */
131
     */
132
    public function withHeader($name, $value);
132
    public function withHeader(string $name, $value): MessageInterface;
Línea 133... Línea 133...
133
 
133
 
134
    /**
134
    /**
135
     * 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.
136
     *
136
     *
Línea 145... Línea 145...
145
     * @param string $name Case-insensitive header field name to add.
145
     * @param string $name Case-insensitive header field name to add.
146
     * @param string|string[] $value Header value(s).
146
     * @param string|string[] $value Header value(s).
147
     * @return static
147
     * @return static
148
     * @throws \InvalidArgumentException for invalid header names or values.
148
     * @throws \InvalidArgumentException for invalid header names or values.
149
     */
149
     */
150
    public function withAddedHeader($name, $value);
150
    public function withAddedHeader(string $name, $value): MessageInterface;
Línea 151... Línea 151...
151
 
151
 
152
    /**
152
    /**
153
     * Return an instance without the specified header.
153
     * Return an instance without the specified header.
154
     *
154
     *
Línea 159... Línea 159...
159
     * the named header.
159
     * the named header.
160
     *
160
     *
161
     * @param string $name Case-insensitive header field name to remove.
161
     * @param string $name Case-insensitive header field name to remove.
162
     * @return static
162
     * @return static
163
     */
163
     */
164
    public function withoutHeader($name);
164
    public function withoutHeader(string $name): MessageInterface;
Línea 165... Línea 165...
165
 
165
 
166
    /**
166
    /**
167
     * Gets the body of the message.
167
     * Gets the body of the message.
168
     *
168
     *
169
     * @return StreamInterface Returns the body as a stream.
169
     * @return StreamInterface Returns the body as a stream.
170
     */
170
     */
Línea 171... Línea 171...
171
    public function getBody();
171
    public function getBody(): StreamInterface;
172
 
172
 
173
    /**
173
    /**
174
     * Return an instance with the specified message body.
174
     * Return an instance with the specified message body.
Línea 181... Línea 181...
181
     *
181
     *
182
     * @param StreamInterface $body Body.
182
     * @param StreamInterface $body Body.
183
     * @return static
183
     * @return static
184
     * @throws \InvalidArgumentException When the body is not valid.
184
     * @throws \InvalidArgumentException When the body is not valid.
185
     */
185
     */
186
    public function withBody(StreamInterface $body);
186
    public function withBody(StreamInterface $body): MessageInterface;
187
}
187
}