ServicesRestController extends AbstractRestController
in package

Tags
since
1.0

Table of Contents

VENDOR  = 'motopress/appointment'
VERSION  = 1
getAvailableServices()  : WP_REST_Response|WP_Error
getNamespace()  : string
getServices()  : WP_REST_Response|WP_Error
register_routes()  : mixed
getMultipleServices()  : WP_REST_Response|WP_Error
getSingleService()  : WP_REST_Response|WP_Error
mapEntity()  : array<string|int, mixed>

Constants

VENDOR

public mixed VENDOR = 'motopress/appointment'
Tags
since
1.0

VERSION

public mixed VERSION = 1
Tags
since
1.0

Methods

getAvailableServices()

public getAvailableServices(WP_REST_Request $request) : WP_REST_Response|WP_Error
Parameters
$request : WP_REST_Request
Tags
since
1.0
Return values
WP_REST_Response|WP_Error

getNamespace()

public getNamespace() : string
Tags
since
1.0
Return values
string

getServices()

public getServices(WP_REST_Request $request) : WP_REST_Response|WP_Error
Parameters
$request : WP_REST_Request
Tags
since
1.0
since
1.9.0

accepts multiple IDs.

Return values
WP_REST_Response|WP_Error

register_routes()

public register_routes() : mixed
Tags
since
1.0
Return values
mixed

getMultipleServices()

protected getMultipleServices(array<string|int, int> $serviceIds) : WP_REST_Response|WP_Error
Parameters
$serviceIds : array<string|int, int>
Return values
WP_REST_Response|WP_Error

getSingleService()

protected getSingleService(int $serviceId) : WP_REST_Response|WP_Error
Parameters
$serviceId : int
Return values
WP_REST_Response|WP_Error

mapEntity()

protected mapEntity(Service $entity) : array<string|int, mixed>
Parameters
$entity : Service
Tags
since
1.0
Return values
array<string|int, mixed>

Search results