the main class of the jelix core
this is the "chief orchestra" of the framework. Its goal is to load the configuration, to get the request parameters used to instancie the correspondant controllers and to run the right method.
| package |
jelix |
|---|---|
| subpackage |
core |
__construct( $configFile = '', boolean $enableErrorHandler = true)
booleanenable the error handler of jelix. keep it to true, unless you have something to debug and really have to use the default handler or an other handler
_loadPlugins()
errorHandler(integer $errno, string $errmsg, string $filename, integer $linenum, array $errcontext)
Replace the default PHP error handler.
| since | 1.4 |
|---|---|
integererror code
stringerror message
stringfilename where the error appears
integerline number where the error appears
array
exceptionHandler(\Exception $e)
| since | 1.4 |
|---|---|
\Exceptionthe exception object
execOriginalAction() : boolean
booleantrue if yes
getController(\jSelectorAct $selector) : \jController
| Throws |
|
|---|
\jSelectorAct
\jControllerthe controller corresponding to the selector
getErrorMessage() : \jLogErrorMessage
getGenericErrorMessage() : string
Replaced the %code% pattern in the message by the current error code
string
getPlugin(string $pluginName, boolean $required = true) : \jICoordPlugin
| Throws |
|
|---|
stringthe name of the plugin
booleansays if the plugin is required or not. If true, will generate an exception if the plugin is not registered.
\jICoordPlugin
handleError(string $type, integer $code, string $message, string $file, integer $line, array $trace)
| since | 1.1 |
|---|---|
stringerror type : 'error', 'warning', 'notice'
integererror code
stringerror message
stringthe file name where the error appear
integerthe line number where the error appear
arraythe stack trace
isPluginEnabled(string $pluginName) : boolean
string
booleantrue : plugin is ok
process(\jRequest $request = null)
This method should be called in a entry point.
| Throws |
|
|---|
\jRequestthe request object. It is required if a descendant of jCoordinator did not called setRequest before
setRequest(\jRequest $request)
It extracts information for the request to set the module name and the action name. It doesn't verify if the corresponding controller does exist or not. It enables also the error handler of Jelix, if needed. Does not call this method directly in entry points. Prefer to call process() instead (that will call setRequest). setRequest is mostly used for tests or specific contexts.
| see | \jCoordinator::process() |
|---|---|
| Throws |
|
plugins : array
| var |
|---|
array
originalAction : \jSelectorAct
moduleName : string
| var |
|---|
string
actionName : string
| var |
|---|
string