PHP Class Spy_REST_Server

Inheritance: extends WP_REST_Server
ファイルを表示 Open project: lucatume/wp-browser

Public Properties

Property Type Description
$last_request
$sent_body
$sent_headers

Public Methods

Method Description
__call ( string $method, array $args ) : mixed Allow calling protected methods from tests
dispatch ( WP_REST_Request $request ) : WP_REST_Response Override the dispatch method so we can get a handle on the request object.
get_raw_endpoint_data ( ) : array Get the raw $endpoints data from the server
send_header ( $header, $value )
serve_request ( $path = null )

Method Details

__call() public method

Allow calling protected methods from tests
public __call ( string $method, array $args ) : mixed
$method string Method to call
$args array Arguments to pass to the method
return mixed

dispatch() public method

Override the dispatch method so we can get a handle on the request object.
public dispatch ( WP_REST_Request $request ) : WP_REST_Response
$request WP_REST_Request
return WP_REST_Response Response returned by the callback.

get_raw_endpoint_data() public method

Get the raw $endpoints data from the server
public get_raw_endpoint_data ( ) : array
return array

send_header() public method

public send_header ( $header, $value )

serve_request() public method

public serve_request ( $path = null )

Property Details

$last_request public_oe property

public $last_request

$sent_body public_oe property

public $sent_body

$sent_headers public_oe property

public $sent_headers