Controller

abstract
class Controller {}

Constructors

this
this()
Undocumented in source.

Members

Functions

addAcceptedMiddleware
void addAcceptedMiddleware(string fullName, string actionName, string controllerName, string moduleName)
addMiddleware
bool addMiddleware(MiddlewareInterface m)

add middleware return true is ok, the named middleware is already exist return false

addSkippedMiddleware
void addSkippedMiddleware(string fullName, string actionName, string controllerName, string moduleName)
after
bool after()

called after action return true is continue false is finish

auth
Auth auth()

Handle the auth status

before
bool before()

called before action return true is continue false is finish

createRequest
Request createRequest(bool isRestful)
Undocumented in source. Be warned that the author may not have intended to support it.
dispose
void dispose()
Undocumented in source. Be warned that the author may not have intended to support it.
done
void done()
Undocumented in source. Be warned that the author may not have intended to support it.
getAcceptedMiddlewaresInController
MiddlewareInterface[] getAcceptedMiddlewaresInController(string actionName)
Undocumented in source. Be warned that the author may not have intended to support it.
getAcceptedMiddlewaresInRouteGroup
MiddlewareInterface[] getAcceptedMiddlewaresInRouteGroup(string routeGroup)
Undocumented in source. Be warned that the author may not have intended to support it.
getAcceptedMiddlewaresInRouteItem
MiddlewareInterface[] getAcceptedMiddlewaresInRouteItem(string routeGroup, string actionId)
Undocumented in source. Be warned that the author may not have intended to support it.
getMiddlewares
MiddlewareInterface[string] getMiddlewares()
Undocumented in source. Be warned that the author may not have intended to support it.
handleAuthResponse
void handleAuthResponse()
Undocumented in source. Be warned that the author may not have intended to support it.
handleCors
void handleCors()
Undocumented in source. Be warned that the author may not have intended to support it.
handleMiddlewares
Response handleMiddlewares(string actionName)
Undocumented in source. Be warned that the author may not have intended to support it.
isSkippedMiddlewareInControllerAction
bool isSkippedMiddlewareInControllerAction(string actionName, string middlewareName)
Undocumented in source. Be warned that the author may not have intended to support it.
isSkippedMiddlewareInRouteGroup
bool isSkippedMiddlewareInRouteGroup(string fullName, string routeGroup)
Undocumented in source. Be warned that the author may not have intended to support it.
isSkippedMiddlewareInRouteItem
bool isSkippedMiddlewareInRouteItem(string fullName, string routeGroup, string actionId)
Undocumented in source. Be warned that the author may not have intended to support it.
onError
Response onError(Response response)
Undocumented in source. Be warned that the author may not have intended to support it.
processResponse
Response processResponse(Response res)
Undocumented in source. Be warned that the author may not have intended to support it.
raiseError
void raiseError(Response response)
Undocumented in source. Be warned that the author may not have intended to support it.
request
Request request()
Undocumented in source. Be warned that the author may not have intended to support it.
routingContext
RoutingContext routingContext()
Undocumented in source. Be warned that the author may not have intended to support it.
user
Identity user()

Get the currently authenticated user.

validate
ConstraintValidatorContext validate()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

response
Response response [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
response
Response response [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
view
View view [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_actionValidators
QueryParameterValidator[string] _actionValidators;
Undocumented in source.
_currentActionName
string _currentActionName;
Undocumented in source.
_routingContext
RoutingContext _routingContext;
Undocumented in source.
_view
View _view;
Undocumented in source.
middlewares
MiddlewareInterface[string] middlewares;

called before all actions

Meta