PHP 클래스 WP_REST_Users_Controller, wordpress

또한 보기: WP_REST_Controller
부터: 4.7.0
상속: extends WP_REST_Controller
파일 보기 프로젝트 열기: johnpbloch/wordpress 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$meta WP_REST_User_Meta_Fields Instance of a user meta fields object.

공개 메소드들

메소드 설명
__construct ( ) Constructor.
check_user_password ( mixed $value, WP_REST_Request $request, string $param ) : WP_Error | string Check a user password for the REST API.
check_username ( mixed $value, WP_REST_Request $request, string $param ) : WP_Error | string Check a username for the REST API.
create_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Creates a single user.
create_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error Checks if a given request has access create users.
delete_current_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Deletes the current user.
delete_current_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error Checks if a given request has access to delete the current user.
delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Deletes a single user.
delete_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error Checks if a given request has access delete a user.
get_collection_params ( ) : array Retrieves the query params for collections.
get_current_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Retrieves the current user.
get_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Retrieves a single user.
get_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error Checks if a given request has access to read a user.
get_item_schema ( ) : array Retrieves the user's schema, conforming to JSON Schema.
get_items ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Retrieves all users.
get_items_permissions_check ( WP_REST_Request $request ) : true | WP_Error Permissions check for getting all users.
prepare_item_for_response ( WP_User $user, WP_REST_Request $request ) : WP_REST_Response Prepares a single user output for response.
register_routes ( ) Registers the routes for the objects of the controller.
update_current_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Updates the current user.
update_current_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error Checks if a given request has access to update the current user.
update_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Updates a single user.
update_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error Checks if a given request has access to update a user.

보호된 메소드들

메소드 설명
check_role_update ( integer $user_id, array $roles ) : true | WP_Error Determines if the current user is allowed to make the desired roles change.
prepare_item_for_database ( WP_REST_Request $request ) : object Prepares a single user for creation or update.
prepare_links ( WP_Post $user ) : array Prepares links for the user request.

메소드 상세

__construct() 공개 메소드

Constructor.
부터: 4.7.0
public __construct ( )

check_role_update() 보호된 메소드

Determines if the current user is allowed to make the desired roles change.
부터: 4.7.0
protected check_role_update ( integer $user_id, array $roles ) : true | WP_Error
$user_id integer User ID.
$roles array New user roles.
리턴 true | WP_Error True if the current user is allowed to make the role change, otherwise a WP_Error object.

check_user_password() 공개 메소드

Performs a couple of checks like edit_user() in wp-admin/includes/user.php.
부터: 4.7.0
public check_user_password ( mixed $value, WP_REST_Request $request, string $param ) : WP_Error | string
$value mixed The password submitted in the request.
$request WP_REST_Request Full details about the request.
$param string The parameter name.
리턴 WP_Error | string The sanitized password, if valid, otherwise an error.

check_username() 공개 메소드

Performs a couple of checks like edit_user() in wp-admin/includes/user.php.
부터: 4.7.0
public check_username ( mixed $value, WP_REST_Request $request, string $param ) : WP_Error | string
$value mixed The username submitted in the request.
$request WP_REST_Request Full details about the request.
$param string The parameter name.
리턴 WP_Error | string The sanitized username, if valid, otherwise an error.

create_item() 공개 메소드

Creates a single user.
부터: 4.7.0
public create_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

create_item_permissions_check() 공개 메소드

Checks if a given request has access create users.
부터: 4.7.0
public create_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error
$request WP_REST_Request Full details about the request.
리턴 true | WP_Error True if the request has access to create items, WP_Error object otherwise.

delete_current_item() 공개 메소드

Deletes the current user.
부터: 4.7.0
public delete_current_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

delete_current_item_permissions_check() 공개 메소드

Checks if a given request has access to delete the current user.
부터: 4.7.0
public delete_current_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error
$request WP_REST_Request Full details about the request.
리턴 true | WP_Error True if the request has access to delete the item, WP_Error object otherwise.

delete_item() 공개 메소드

Deletes a single user.
부터: 4.7.0
public delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

delete_item_permissions_check() 공개 메소드

Checks if a given request has access delete a user.
부터: 4.7.0
public delete_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error
$request WP_REST_Request Full details about the request.
리턴 true | WP_Error True if the request has access to delete the item, WP_Error object otherwise.

get_collection_params() 공개 메소드

Retrieves the query params for collections.
부터: 4.7.0
public get_collection_params ( ) : array
리턴 array Collection parameters.

get_current_item() 공개 메소드

Retrieves the current user.
부터: 4.7.0
public get_current_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

get_item() 공개 메소드

Retrieves a single user.
부터: 4.7.0
public get_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

get_item_permissions_check() 공개 메소드

Checks if a given request has access to read a user.
부터: 4.7.0
public get_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error
$request WP_REST_Request Full details about the request.
리턴 true | WP_Error True if the request has read access for the item, otherwise WP_Error object.

get_item_schema() 공개 메소드

Retrieves the user's schema, conforming to JSON Schema.
부터: 4.7.0
public get_item_schema ( ) : array
리턴 array Item schema data.

get_items() 공개 메소드

Retrieves all users.
부터: 4.7.0
public get_items ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

get_items_permissions_check() 공개 메소드

Permissions check for getting all users.
부터: 4.7.0
public get_items_permissions_check ( WP_REST_Request $request ) : true | WP_Error
$request WP_REST_Request Full details about the request.
리턴 true | WP_Error True if the request has read access, otherwise WP_Error object.

prepare_item_for_database() 보호된 메소드

Prepares a single user for creation or update.
부터: 4.7.0
protected prepare_item_for_database ( WP_REST_Request $request ) : object
$request WP_REST_Request Request object.
리턴 object $prepared_user User object.

prepare_item_for_response() 공개 메소드

Prepares a single user output for response.
부터: 4.7.0
public prepare_item_for_response ( WP_User $user, WP_REST_Request $request ) : WP_REST_Response
$user WP_User User object.
$request WP_REST_Request Request object.
리턴 WP_REST_Response Response object.

register_routes() 공개 메소드

Registers the routes for the objects of the controller.
또한 보기: register_rest_route()
부터: 4.7.0
public register_routes ( )

update_current_item() 공개 메소드

Updates the current user.
부터: 4.7.0
public update_current_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

update_current_item_permissions_check() 공개 메소드

Checks if a given request has access to update the current user.
부터: 4.7.0
public update_current_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error
$request WP_REST_Request Full details about the request.
리턴 true | WP_Error True if the request has access to update the item, WP_Error object otherwise.

update_item() 공개 메소드

Updates a single user.
부터: 4.7.0
public update_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

update_item_permissions_check() 공개 메소드

Checks if a given request has access to update a user.
부터: 4.7.0
public update_item_permissions_check ( WP_REST_Request $request ) : true | WP_Error
$request WP_REST_Request Full details about the request.
리턴 true | WP_Error True if the request has access to update the item, WP_Error object otherwise.

프로퍼티 상세

$meta 보호되어 있는 프로퍼티

Instance of a user meta fields object.
부터: 4.7.0
protected WP_REST_User_Meta_Fields $meta
리턴 WP_REST_User_Meta_Fields