Documentation

ControllerItem

Class ControllerItem Controller for Item Model

Tags
author

Guillaume ARNOUX

Table of Contents

$args  : array<string|int, mixed>
$container  : Container
$item  : Item|null
$renderer  : ItemView
$request  : Request
$response  : Response
$user  : User|null
__construct()  : mixed
ControllerItem constructor
actionPot()  : Response
Process request for the pot of an item
delete()  : Response
Control the deletion of an item
edit()  : Response
Control edition of an item
reserve()  : Response
Control reservation of an item
show()  : Response
Control the display of an item
createPot()  : Response
Control creation of pot for an item
deletePot()  : Response
Control creation of pot for an item
participatePot()  : Response
Control editing of pot for an item

Properties

Methods

__construct()

ControllerItem 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

actionPot()

Process request for the pot of an item

public actionPot() : Response
Tags
throws
MethodNotAllowedException

if the request method is not allowed

throws
NotFoundException

if the item does not exist

throws
ForbiddenException

if the user cannot interact with the item

Return values
Response

delete()

Control the deletion of an item

public delete() : Response
Tags
throws
ForbiddenException
throws
MethodNotAllowedException
throws
NotFoundException
Return values
Response

edit()

Control edition of an item

public edit() : Response
Tags
throws
ForbiddenException
throws
MethodNotAllowedException
throws
NotFoundException
Return values
Response

reserve()

Control reservation of an item

public reserve() : Response
Tags
throws
ForbiddenException
throws
MethodNotAllowedException
throws
NotFoundException
Return values
Response

show()

Control the display of an item

public show() : Response
Tags
throws
ForbiddenException
throws
MethodNotAllowedException
throws
NotFoundException
Return values
Response

createPot()

Control creation of pot for an item

private createPot() : Response
Tags
throws
ForbiddenException
throws
MethodNotAllowedException
throws
NotFoundException
Return values
Response

deletePot()

Control creation of pot for an item

private deletePot() : Response
Tags
throws
ForbiddenException
throws
MethodNotAllowedException
throws
NotFoundException
Return values
Response

participatePot()

Control editing of pot for an item

private participatePot() : Response
Tags
throws
ForbiddenException
throws
MethodNotAllowedException
throws
NotFoundException
Return values
Response

Search results