Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 49... Línea 49...
49
     * typically derived from PHP's $_SERVER superglobal. The data IS NOT
49
     * typically derived from PHP's $_SERVER superglobal. The data IS NOT
50
     * REQUIRED to originate from $_SERVER.
50
     * REQUIRED to originate from $_SERVER.
51
     *
51
     *
52
     * @return array
52
     * @return array
53
     */
53
     */
54
    public function getServerParams();
54
    public function getServerParams(): array;
Línea 55... Línea 55...
55
 
55
 
56
    /**
56
    /**
57
     * Retrieve cookies.
57
     * Retrieve cookies.
58
     *
58
     *
Línea 61... Línea 61...
61
     * The data MUST be compatible with the structure of the $_COOKIE
61
     * The data MUST be compatible with the structure of the $_COOKIE
62
     * superglobal.
62
     * superglobal.
63
     *
63
     *
64
     * @return array
64
     * @return array
65
     */
65
     */
66
    public function getCookieParams();
66
    public function getCookieParams(): array;
Línea 67... Línea 67...
67
 
67
 
68
    /**
68
    /**
69
     * Return an instance with the specified cookies.
69
     * Return an instance with the specified cookies.
70
     *
70
     *
Línea 80... Línea 80...
80
     * updated cookie values.
80
     * updated cookie values.
81
     *
81
     *
82
     * @param array $cookies Array of key/value pairs representing cookies.
82
     * @param array $cookies Array of key/value pairs representing cookies.
83
     * @return static
83
     * @return static
84
     */
84
     */
85
    public function withCookieParams(array $cookies);
85
    public function withCookieParams(array $cookies): ServerRequestInterface;
Línea 86... Línea 86...
86
 
86
 
87
    /**
87
    /**
88
     * Retrieve query string arguments.
88
     * Retrieve query string arguments.
89
     *
89
     *
Línea 94... Línea 94...
94
     * values, you may need to parse the query string from `getUri()->getQuery()`
94
     * values, you may need to parse the query string from `getUri()->getQuery()`
95
     * or from the `QUERY_STRING` server param.
95
     * or from the `QUERY_STRING` server param.
96
     *
96
     *
97
     * @return array
97
     * @return array
98
     */
98
     */
99
    public function getQueryParams();
99
    public function getQueryParams(): array;
Línea 100... Línea 100...
100
 
100
 
101
    /**
101
    /**
102
     * Return an instance with the specified query string arguments.
102
     * Return an instance with the specified query string arguments.
103
     *
103
     *
Línea 118... Línea 118...
118
     *
118
     *
119
     * @param array $query Array of query string arguments, typically from
119
     * @param array $query Array of query string arguments, typically from
120
     *     $_GET.
120
     *     $_GET.
121
     * @return static
121
     * @return static
122
     */
122
     */
123
    public function withQueryParams(array $query);
123
    public function withQueryParams(array $query): ServerRequestInterface;
Línea 124... Línea 124...
124
 
124
 
125
    /**
125
    /**
126
     * Retrieve normalized file upload data.
126
     * Retrieve normalized file upload data.
127
     *
127
     *
Línea 132... Línea 132...
132
     * instantiation, or MAY be injected via withUploadedFiles().
132
     * instantiation, or MAY be injected via withUploadedFiles().
133
     *
133
     *
134
     * @return array An array tree of UploadedFileInterface instances; an empty
134
     * @return array An array tree of UploadedFileInterface instances; an empty
135
     *     array MUST be returned if no data is present.
135
     *     array MUST be returned if no data is present.
136
     */
136
     */
137
    public function getUploadedFiles();
137
    public function getUploadedFiles(): array;
Línea 138... Línea 138...
138
 
138
 
139
    /**
139
    /**
140
     * Create a new instance with the specified uploaded files.
140
     * Create a new instance with the specified uploaded files.
141
     *
141
     *
Línea 145... Línea 145...
145
     *
145
     *
146
     * @param array $uploadedFiles An array tree of UploadedFileInterface instances.
146
     * @param array $uploadedFiles An array tree of UploadedFileInterface instances.
147
     * @return static
147
     * @return static
148
     * @throws \InvalidArgumentException if an invalid structure is provided.
148
     * @throws \InvalidArgumentException if an invalid structure is provided.
149
     */
149
     */
150
    public function withUploadedFiles(array $uploadedFiles);
150
    public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface;
Línea 151... Línea 151...
151
 
151
 
152
    /**
152
    /**
153
     * Retrieve any parameters provided in the request body.
153
     * Retrieve any parameters provided in the request body.
154
     *
154
     *
Línea 192... Línea 192...
192
     *     typically be in an array or object.
192
     *     typically be in an array or object.
193
     * @return static
193
     * @return static
194
     * @throws \InvalidArgumentException if an unsupported argument type is
194
     * @throws \InvalidArgumentException if an unsupported argument type is
195
     *     provided.
195
     *     provided.
196
     */
196
     */
197
    public function withParsedBody($data);
197
    public function withParsedBody($data): ServerRequestInterface;
Línea 198... Línea 198...
198
 
198
 
199
    /**
199
    /**
200
     * Retrieve attributes derived from the request.
200
     * Retrieve attributes derived from the request.
201
     *
201
     *
Línea 205... Línea 205...
205
     * deserializing non-form-encoded message bodies; etc. Attributes
205
     * deserializing non-form-encoded message bodies; etc. Attributes
206
     * will be application and request specific, and CAN be mutable.
206
     * will be application and request specific, and CAN be mutable.
207
     *
207
     *
208
     * @return array Attributes derived from the request.
208
     * @return array Attributes derived from the request.
209
     */
209
     */
210
    public function getAttributes();
210
    public function getAttributes(): array;
Línea 211... Línea 211...
211
 
211
 
212
    /**
212
    /**
213
     * Retrieve a single derived request attribute.
213
     * Retrieve a single derived request attribute.
214
     *
214
     *
Línea 222... Línea 222...
222
     * @see getAttributes()
222
     * @see getAttributes()
223
     * @param string $name The attribute name.
223
     * @param string $name The attribute name.
224
     * @param mixed $default Default value to return if the attribute does not exist.
224
     * @param mixed $default Default value to return if the attribute does not exist.
225
     * @return mixed
225
     * @return mixed
226
     */
226
     */
227
    public function getAttribute($name, $default = null);
227
    public function getAttribute(string $name, $default = null);
Línea 228... Línea 228...
228
 
228
 
229
    /**
229
    /**
230
     * Return an instance with the specified derived request attribute.
230
     * Return an instance with the specified derived request attribute.
231
     *
231
     *
Línea 239... Línea 239...
239
     * @see getAttributes()
239
     * @see getAttributes()
240
     * @param string $name The attribute name.
240
     * @param string $name The attribute name.
241
     * @param mixed $value The value of the attribute.
241
     * @param mixed $value The value of the attribute.
242
     * @return static
242
     * @return static
243
     */
243
     */
244
    public function withAttribute($name, $value);
244
    public function withAttribute(string $name, $value): ServerRequestInterface;
Línea 245... Línea 245...
245
 
245
 
246
    /**
246
    /**
247
     * Return an instance that removes the specified derived request attribute.
247
     * Return an instance that removes the specified derived request attribute.
248
     *
248
     *
Línea 255... Línea 255...
255
     *
255
     *
256
     * @see getAttributes()
256
     * @see getAttributes()
257
     * @param string $name The attribute name.
257
     * @param string $name The attribute name.
258
     * @return static
258
     * @return static
259
     */
259
     */
260
    public function withoutAttribute($name);
260
    public function withoutAttribute(string $name): ServerRequestInterface;
261
}
261
}