Documentation

ControllerAPI

Class ControllerAPI Controller for the global API

Tags
author

Guillaume ARNOUX

Table of Contents

$args  : array<string|int, mixed>
$container  : Container
$request  : Request
$response  : Response
$user  : User
__construct()  : mixed
ControllerAPI constructor
forbidden()  : void
Send a 403 Forbidden response
itemsV1()  : Response
Generate JSON response for an item
listsV1()  : Response
Generate JSON response with a list of items
notAllowed()  : void
Send a 405 Method Not Allowed response
unauthorized()  : void
Send a 401 Unauthorized response

Properties

Methods

__construct()

ControllerAPI constructor

public __construct(Container $c, Request $request, Response $response, array<string|int, mixed> $args) : mixed
Parameters
$c : Container
$request : Request
$response : Response
$args : array<string|int, mixed>
Return values
mixed

forbidden()

Send a 403 Forbidden response

public static forbidden() : void
Return values
void

itemsV1()

Generate JSON response for an item

public itemsV1() : Response
Return values
Response

JSON response

listsV1()

Generate JSON response with a list of items

public listsV1() : Response
Return values
Response

JSON response

notAllowed()

Send a 405 Method Not Allowed response

public static notAllowed() : void
Return values
void

unauthorized()

Send a 401 Unauthorized response

public static unauthorized() : void
Return values
void

Search results