@startuml class HttpRequest implements ArrayAccess { - data: array + __construct(data: array) + offsetExists(offset: mixed): bool + offsetGet(offset: mixed): mixed + offsetSet(offset: mixed, value: mixed) + offsetUnset(offset: mixed) + from(request: array, fails: &array, schema: array): HttpRequest + fromPayload(fails: &array, schema: array): HttpRequest } class HttpResponse { - code: int - headers : array + __construct(code: int,headers:array) + getCode(): int + getHeaders(): array + redirect(url:string, code:int): HttpResponse {static} + fromCode(code: int): HttpResponse {static} } class JsonHttpResponse extends HttpResponse { - payload: mixed + __construct(payload: mixed, code: int) + getJson(): string } class ViewHttpResponse extends HttpResponse { + TWIG_VIEW: int {frozen} {static} + REACT_VIEW: int {frozen} {static} - file: string - arguments: array - kind: int - __construct(kind: int, file: string, arguments: array, code: int) + getViewKind(): int + getFile(): string + getArguments(): array + twig(file: string, arguments: array, code: int): ViewHttpResponse + react(file: string, arguments: array, code: int): ViewHttpResponse } note right of ViewHttpResponse Into src/App end note class HttpCodes{ + OK : int {static} {frozen} + FOUND : int {static} {frozen} + BAD_REQUEST : int {static} {frozen} + UNAUTHORIZED : int {static} {frozen} + FORBIDDEN : int {static} {frozen} + NOT_FOUND : int {static} {frozen} } HttpCodes <.. ViewHttpResponse HttpCodes <.. HttpResponse @enduml