Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Add request object #563

Merged
merged 12 commits into from
Nov 2, 2014
9 changes: 4 additions & 5 deletions lib/class-wp-json-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,31 @@ abstract class WP_JSON_Controller {
/**
* Get a collection of items
*
* @param array $args (optional) Arguments supplied in the request
* @param WP_JSON_Request $request Full data about the request
* @return array|WP_Error
*/
public function get_items( array $args, WP_JSON_Request $request ) {
public function get_items( WP_JSON_Request $request ) {
return new WP_Error( 'invalid-method', __( "Method not implemented. Must be over-ridden in subclass." ), array( 'status' => 405 ) );
}

/**
* Get one item from the collection
*/
public function get_item( array $args, WP_JSON_Request $request ) {
public function get_item( WP_JSON_Request $request ) {
return new WP_Error( 'invalid-method', __( "Method not implemented. Must be over-ridden in subclass." ), array( 'status' => 405 ) );
}

/**
* Update one item from the collection
*/
public function update_item( array $args, WP_JSON_Request $request ) {
public function update_item( WP_JSON_Request $request ) {
return new WP_Error( 'invalid-method', __( "Method not implemented. Must be over-ridden in subclass." ), array( 'status' => 405 ) );
}

/**
* Delete one item from the collection
*/
public function delete_item( array $args, WP_JSON_Request $request ) {
public function delete_item( WP_JSON_Request $request ) {
return new WP_Error( 'invalid-method', __( "Method not implemented. Must be over-ridden in subclass." ), array( 'status' => 405 ) );
}

Expand Down
Loading