You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.6 KiB
65 lines
1.6 KiB
@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)
|
|
|
|
+ <u>from(request: array, fails: &array, schema: array): HttpRequest
|
|
+ <u>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
|
|
|
|
+ <u>twig(file: string, arguments: array, code: int): ViewHttpResponse
|
|
+ <u>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 |