IApplication
in
Tags
Table of Contents
Constants
Methods
- addRoute() : mixed
- execute() : mixed
- getContext() : IContext
- getDispatcher() : Dispatcher
- getInstance() : IApplication
- getKind() : string
- Gets the kind of this application. Return value will be one of 'cli', 'api', 'site'
- getName() : string
- Gets the name of the application.
- getRequest() : IRequest
- getResponse() : IResponse
- getRouter() : IRouter
- redirect() : void
- If the current application being run is of the kind 'api' or 'site' then an HTTP 'Location' header for a particular URI will be sent and execution will end. If however the application being run is of the kind 'cli' then execution will be redirected to another controller and action within the cli application
- respond() : mixed
- Sends a response from the application.
Constants
KIND_API
public
string
KIND_API
= 'api'
KIND_CLI
public
string
KIND_CLI
= 'cli'
KIND_SITE
public
string
KIND_SITE
= 'site'
Methods
addRoute()
public
addRoute(IRoute $route) : mixed
Parameters
- $route : IRoute
execute()
public
execute(IRequest $message) : mixed
Parameters
- $message : IRequest
getContext()
public
getContext() : IContext
Return values
IContextgetDispatcher()
public
getDispatcher() : Dispatcher
Return values
DispatchergetInstance()
public
static getInstance() : IApplication
Return values
IApplicationgetKind()
Gets the kind of this application. Return value will be one of 'cli', 'api', 'site'
public
getKind() : string
Return values
stringgetName()
Gets the name of the application.
public
getName() : string
Return values
stringgetRequest()
public
getRequest() : IRequest
Return values
IRequestgetResponse()
public
getResponse() : IResponse
Return values
IResponsegetRouter()
public
getRouter() : IRouter
Return values
IRouterredirect()
If the current application being run is of the kind 'api' or 'site' then an HTTP 'Location' header for a particular URI will be sent and execution will end. If however the application being run is of the kind 'cli' then execution will be redirected to another controller and action within the cli application
public
redirect(IUri|string $uri) : void
Parameters
- $uri : IUri|string
respond()
Sends a response from the application.
public
respond([string|Exception|null $message = null ]) : mixed
Parameters
- $message : string|Exception|null = null
-
The message to exit the application with