mirror of
https://gh.wpcy.net/https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2026-04-25 01:02:18 +08:00
44 lines
735 B
PHP
44 lines
735 B
PHP
<?php
|
|
/**
|
|
* Stub for WP_REST_Request
|
|
*/
|
|
|
|
class WP_REST_Request {
|
|
protected $method;
|
|
protected $route;
|
|
protected $body;
|
|
protected $params = array();
|
|
|
|
public function __construct( $method = '', $route = '' ) {
|
|
$this->method = $method;
|
|
$this->route = $route;
|
|
}
|
|
|
|
public function get_method() {
|
|
return $this->method;
|
|
}
|
|
|
|
public function get_route() {
|
|
return $this->route;
|
|
}
|
|
|
|
public function set_body( $body ) {
|
|
$this->body = $body;
|
|
}
|
|
|
|
public function get_body() {
|
|
return $this->body;
|
|
}
|
|
|
|
public function set_param( $key, $value ) {
|
|
$this->params[ $key ] = $value;
|
|
}
|
|
|
|
public function get_param( $key ) {
|
|
return $this->params[ $key ] ?? null;
|
|
}
|
|
|
|
public function get_params() {
|
|
return $this->params;
|
|
}
|
|
}
|