Summery Summery
Constructor.
Syntax Syntax
Parameters Parameters
- $method
-
(Optional) Request method.
Default value: ''
- $route
-
(Optional) Request route.
Default value: ''
- $attributes
-
(Optional) Request attributes.
Default value: array()
Source Source
File: wp-includes/rest-api/class-wp-rest-request.php
public function __construct( $method = '', $route = '', $attributes = array() ) {
$this->params = array(
'URL' => array(),
'GET' => array(),
'POST' => array(),
'FILES' => array(),
// See parse_json_params.
'JSON' => null,
'defaults' => array(),
);
$this->set_method( $method );
$this->set_route( $route );
$this->set_attributes( $attributes );
}
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |