DoDomuDojade Documentation

BaseController
in package

AbstractYes

Table of Contents

Properties

$flash  : FlashMessengerInterface
$renderer  : ViewRendererInterface
$requestContext  : RequestContext

Methods

__construct()  : mixed
flash()  : void
getCurrentUserId()  : int|null
jsonResponse()  : ResponseInterface
JSON response helper
noContentResponse()  : ResponseInterface
No content response helper
redirect()  : ResponseInterface
Redirect to URL
render()  : ResponseInterface
Render view and return as response

Properties

Methods

flash()

protected flash(string $key, string $message) : void
Parameters
$key : string
$message : string

jsonResponse()

JSON response helper

protected jsonResponse(int $statusCode, array<string|int, mixed> $data) : ResponseInterface
Parameters
$statusCode : int
$data : array<string|int, mixed>
Return values
ResponseInterface

noContentResponse()

No content response helper

protected noContentResponse([int $statusCode = 204 ]) : ResponseInterface
Parameters
$statusCode : int = 204
Return values
ResponseInterface

redirect()

Redirect to URL

protected redirect(string $location[, int $statusCode = 302 ]) : ResponseInterface
Parameters
$location : string
$statusCode : int = 302
Return values
ResponseInterface

render()

Render view and return as response

protected render(string $view[, array<string|int, mixed> $data = [] ][, int $statusCode = 200 ]) : ResponseInterface
Parameters
$view : string
$data : array<string|int, mixed> = []
$statusCode : int = 200
Return values
ResponseInterface

        
On this page

Search results