RavSystem API docs

UserAction extends Action
in package

Table of Contents

ACCESS_ID  = 'access_id'
ADDRESS_ID  = 'address_id'
BUILDING_ID  = 'building_id'
FROM_DATE  = 'from'
IMAGE_ID  = 'image_id'
REQUEST_SUBJECT  = 'request_subject'
REQUEST_SUBJECT_ID  = 'subject_id'
RESERVATION_ID  = 'reservation_id'
ROOM_ID  = 'room_id'
SEARCH_STRING  = 'search'
TO_DATE  = 'to'
USER_ID  = 'user_id'
$args  : array<string|int, mixed>
HTTP query args and params
$logger  : LoggerInterface
$pagination  : Pagination|null
$request  : ServerRequestInterface
HTTP request
$response  : ResponseInterface
HTTP response
$userRepository  : IUserRepository
__construct()  : mixed
__invoke()  : ResponseInterface
Called to handle request
preparePagination()  : Pagination
prepares pagination feature object
action()  : ResponseInterface
controller action handling endpoint request
getFormData()  : stdClass
get form data of the request
getUserByEmail()  : User
get user by email string
resolveArg()  : mixed
Resolves argument from URI string
resolveQueryArg()  : mixed
Resolves argument from query string.
respond()  : ResponseInterface
sends response from the API with provided $payload
respondWithData()  : ResponseInterface
responds with given data

Constants

ACCESS_ID

protected mixed ACCESS_ID = 'access_id'

ADDRESS_ID

protected mixed ADDRESS_ID = 'address_id'

BUILDING_ID

protected mixed BUILDING_ID = 'building_id'

FROM_DATE

protected mixed FROM_DATE = 'from'

IMAGE_ID

protected mixed IMAGE_ID = 'image_id'

REQUEST_SUBJECT

protected mixed REQUEST_SUBJECT = 'request_subject'

REQUEST_SUBJECT_ID

protected mixed REQUEST_SUBJECT_ID = 'subject_id'

RESERVATION_ID

protected mixed RESERVATION_ID = 'reservation_id'

ROOM_ID

protected mixed ROOM_ID = 'room_id'

SEARCH_STRING

protected mixed SEARCH_STRING = 'search'

TO_DATE

protected mixed TO_DATE = 'to'

USER_ID

protected mixed USER_ID = 'user_id'

Properties

$args

HTTP query args and params

protected array<string|int, mixed> $args

$logger

protected LoggerInterface $logger

$request

HTTP request

protected ServerRequestInterface $request

$response

HTTP response

protected ResponseInterface $response

Methods

__construct()

public __construct(ContainerInterface $di) : mixed
Parameters
$di : ContainerInterface
Return values
mixed

__invoke()

Called to handle request

public __invoke(ServerRequestInterface $request, ResponseInterface $response, array<string|int, mixed> $args) : ResponseInterface
Parameters
$request : ServerRequestInterface
$response : ResponseInterface
$args : array<string|int, mixed>
Tags
throws
HttpNotFoundException
throws
HttpConflictException
throws
HttpForbiddenException
throws
HttpBadRequestException
throws
HttpUnauthorizedException
Return values
ResponseInterface

action()

controller action handling endpoint request

protected abstract action() : ResponseInterface
Return values
ResponseInterface

getFormData()

get form data of the request

protected getFormData() : stdClass
Return values
stdClass

getUserByEmail()

get user by email string

protected getUserByEmail(string $email) : User
Parameters
$email : string
Return values
User

resolveArg()

Resolves argument from URI string

protected resolveArg(string $name[, mixed $default = NULL ]) : mixed
Parameters
$name : string
$default : mixed = NULL
Tags
throws
HttpBadRequestException
Return values
mixed

resolveQueryArg()

Resolves argument from query string.

protected resolveQueryArg(string $name[, mixed $default = NULL ]) : mixed
Parameters
$name : string
$default : mixed = NULL
Tags
throws
HttpBadRequestException
Return values
mixed

respond()

sends response from the API with provided $payload

protected respond(ActionPayload $payload) : ResponseInterface
Parameters
$payload : ActionPayload
Return values
ResponseInterface

respondWithData()

responds with given data

protected respondWithData([mixed $data = null ][, int $statusCode = 200 ]) : ResponseInterface
Parameters
$data : mixed = null
$statusCode : int = 200
Return values
ResponseInterface

Search results