Class jCoordinator

Description

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.

Located in /core/jCoordinator.class.php (line 24)


	
			
Direct descendents
Class Description
jCmdlineCoordinator The command line version of jCoordinator
jSoapCoordinator Specialisation of the main class of the jelix core for soap purpose
Variable Summary
Method Summary
jCoordinator __construct ([ $configFile = ''], [boolean $enableErrorHandler = true], string|object  $config)
void errorHandler (integer $errno, string $errmsg, string $filename, integer $linenum, array $errcontext)
void exceptionHandler (Exception $e)
boolean execOriginalAction ()
void getController (jSelectorAct $selector)
void getModulePath ( $module, [ $includingExternal = false])
jICoordPlugin getPlugin (string $pluginName, [boolean $required = true])
void handleError (string $type, integer $code, string $message, string $file, integer $line, array $trace)
void initDefaultResponseOfRequest ([boolean $originalResponse = false])
void isModuleEnabled ( $moduleName, [ $includingExternal = false])
boolean isPluginEnabled (string $pluginName)
void process (jRequest $request)
Variables
jSelectorAct $action = null (line 48)

the selector of the current action

  • access: public
string $actionName (line 67)

the current action name

  • access: public
jLogErrorMessage $errorMessage = null (line 73)

the current error message

  • access: protected
string $moduleName (line 61)

the current module name

  • access: public
jSelectorAct $originalAction = null (line 55)

the original action when there is an internal redirection to an action

different from the one corresponding to the request

  • access: public
array $plugins = array() (line 30)

plugin list

  • access: public
jRequest $request = null (line 42)

current request object

  • access: public
jResponse $response = null (line 36)

current response object

  • access: public
Methods
Constructor __construct (line 82)
jCoordinator __construct ([ $configFile = ''], [boolean $enableErrorHandler = true], string|object  $config)
  • string|object $config: filename of the ini file to configure the framework, or the config object itself this parameter is optional if jApp::loadConfig has been already called
  • boolean $enableErrorHandler: enable 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
  • $configFile

Redefined in descendants as:
errorHandler (line 279)

Error handler using a response object to return the error.

Replace the default PHP error handler.

  • since: 1.4
void errorHandler (integer $errno, string $errmsg, string $filename, integer $linenum, array $errcontext)
  • integer $errno: error code
  • string $errmsg: error message
  • string $filename: filename where the error appears
  • integer $linenum: line number where the error appears
  • array $errcontext
exceptionHandler (line 308)

Exception handler using a response object to return the error

Replace the default PHP Exception handler

  • since: 1.4
void exceptionHandler (Exception $e)
  • Exception $e: the exception object
execOriginalAction (line 262)

says if the currently executed action is the original one

  • return: true if yes
  • access: public
boolean execOriginalAction ()
getController (line 218)

get the controller corresponding to the selector

  • access: protected
void getController (jSelectorAct $selector)
getErrorMessage (line 362)
  • return: the current error
  • since: 1.3a1
  • access: public
jLogErrorMessage getErrorMessage ()
getGenericErrorMessage (line 350)

return the generic error message (errorMessage in the configuration).

Replaced the %code% pattern in the message by the current error code

  • access: public
string getGenericErrorMessage ()
getModulePath (line 407)

deprecated. use jApp::getModulePath() instead

  • deprecated:
  • access: public
void getModulePath ( $module, [ $includingExternal = false])
  • $module
  • $includingExternal
getPlugin (line 372)

gets a given coordinator plugin if registered

  • access: public
jICoordPlugin getPlugin (string $pluginName, [boolean $required = true])
  • string $pluginName: the name of the plugin
  • boolean $required: says if the plugin is required or not. If true, will generate an exception if the plugin is not registered.
handleError (line 323)

Handle an error event. Called by error handler and exception handler.

  • since: 1.1
  • access: public
void handleError (string $type, integer $code, string $message, string $file, integer $line, array $trace)
  • string $type: error type : 'error', 'warning', 'notice'
  • integer $code: error code
  • string $message: error message
  • string $file: the file name where the error appear
  • integer $line: the line number where the error appear
  • array $trace: the stack trace

Redefined in descendants as:
initDefaultResponseOfRequest (line 246)

instancy a response object corresponding to the default response type of the current resquest.

Deprecated. use $request->getResponse() instead.

  • deprecated: since 1.3
  • access: public
void initDefaultResponseOfRequest ([boolean $originalResponse = false])
  • boolean $originalResponse: TRUE to get the original, non overloaded response
isModuleEnabled (line 398)

deprecated. use jApp::isModuleEnabled() instead

  • deprecated:
  • access: public
void isModuleEnabled ( $moduleName, [ $includingExternal = false])
  • $moduleName
  • $includingExternal
isPluginEnabled (line 390)

Says if the given coordinator plugin $name is enabled

  • return: true : plugin is ok
  • access: public
boolean isPluginEnabled (string $pluginName)
  • string $pluginName
process (line 130)

main method : launch the execution of the action.

This method should be called in a entry point.

  • access: public
void process (jRequest $request)

Redefined in descendants as:

Documentation generated on Mon, 26 Oct 2015 21:52:25 +0100 by phpDocumentor 1.4.3