Trait Props
Trait as partial class for \MvcCore\Application
:
- Main application objects container (request, response, controller, etc.).
- MvcCore compile mode managing (single file mode, php, phar, or no package).
- Global store for all main core class names, to use them as modules, to be changed any time (request class, response class, debug class, etc.).
Direct Known Users
MvcCore\Application
protected static
|
$instance
Application instance for current request. Singleton instance storage. |
|
protected
string
|
$compiled
Describes if application is running as standard php project or as single file application.
It should has values from:
- |
#
NULL
|
protected
|
$environment
Environment detection instance. |
#
NULL
|
protected
|
$controller
Top most parent controller instance currently dispatched by application. |
#
NULL
|
protected
|
$request
Request object - parsed URI, query params, app paths... |
#
NULL
|
protected
|
$response
Response object - storage for response headers and rendered body. |
#
NULL
|
protected
|
$router
Application http router to route request and build URL addresses. |
#
NULL
|
protected
array[]
|
$preRouteHandlers
Pre route custom closure calls storage.
Every item in this array has to be |
#
[]
|
protected
array[]
|
$postRouteHandlers
Post route custom closure calls storage.
Every item in this array has to be |
#
[]
|
protected
array[]
|
$preDispatchHandlers
Pre dispatch custom calls storage.
Every item in this array has to be |
#
[]
|
protected
array[]
|
$postDispatchHandlers
Post dispatch custom calls storage.
Every item in this array has to be |
#
[]
|
protected
array[]
|
$postTerminateHandlers
Post terminate custom calls storage.
Every item in this array has to be |
#
[]
|
protected
string
|
$environmentClass
Class to detect and manage environment name. |
#
'\MvcCore\Environment'
|
protected
string
|
$configClass
Class to load and parse (system) config(s). |
#
'\MvcCore\Config'
|
protected
string
|
$controllerClass
Class to create default controller for request targeting views only and to handle small assets inside packed application. |
#
'\MvcCore\Controller'
|
protected
string
|
$debugClass
Class to handle any application error to render the error in browser or log in HDD. |
#
'\MvcCore\Debug'
|
protected
string
|
$requestClass
Class to create describing HTTP request object. |
#
'\MvcCore\Request'
|
protected
string
|
$responseClass
Class to create HTTP response object to store response headers and response content. |
#
'\MvcCore\Response'
|
protected
string
|
$routeClass
Class to describe single route with match and replace pattern, controller, action, params default values and params constraints. |
#
'\MvcCore\Route'
|
protected
string
|
$routerClass
Class to store all routes, dispatch request by routes and generate URL addresses by routes. |
#
'\MvcCore\Router'
|
protected
string
|
$sessionClass
Class to configure session namespaces, session opening, writing and expirations. |
#
'\MvcCore\Session'
|
protected
string
|
$toolClass
Class to handle helper calls from MvcCore core modules. |
#
'\MvcCore\Tool'
|
protected
string
|
$viewClass
Class to prepare and render controller view, sub-views and wrapper layout. |
#
'\MvcCore\View'
|
protected
string
|
$appDir
Application scripts and views directory name as |
#
'App'
|
protected
string
|
$controllersDir
Controllers directory name as |
#
'Controllers'
|
protected
string
|
$viewsDir
Views directory name as |
#
'Views'
|
protected
string
|
$defaultControllerName
Default controller name, |
#
'Index'
|
protected
string
|
$defaultControllerDefaultActionName
Default controller default action name, |
#
'Index'
|
protected
string
|
$defaultControllerErrorActionName
Default controller error action name, |
#
'Error'
|
protected
string
|
$defaultControllerNotFoundActionName
Default controller not found error action name, |
#
'NotFound'
|
protected
boolean
|
$terminated
Boolean flag if request has been already terminated or not
to process |
#
FALSE
|