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 (string $configFile)
boolean addErrorMsg (string $type, integer $code, string $message, string $file, integer $line)
void addLogMsg (string $message, [ $type = 'default'])
string getModulePath (string $module)
jICoordPlugin getPlugin (string $pluginName, [boolean $required = true])
void handleError (string $toDo, string $type, integer $code, string $message, string $file, integer $line, array $trace)
mixed initDefaultResponseOfRequest ([boolean $originalResponse = false])
boolean isModuleEnabled (string $moduleName)
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 60)

the current action name

  • access: public
array $errorMessages = array() (line 66)

List of all errors

  • access: public
array $logMessages = array() (line 73)

List of all log messages

  • since: 1.0
  • access: public
string $moduleName (line 54)

the current module name

  • 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 78)
jCoordinator __construct (string $configFile)
  • string $configFile: name of the ini file to configure the framework
addErrorMsg (line 387)

Store an error/warning/notice message.

  • return: true= the process should stop now, false = the error manager do its job
  • access: protected
boolean addErrorMsg (string $type, integer $code, string $message, string $file, integer $line)
  • 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
addLogMsg (line 398)

Store a log message. Responses object should take care of the logMessages properties to display them.

  • since: 1.0
  • access: public
void addLogMsg (string $message, [ $type = 'default'])
  • string $message: error message
  • $type
getModulePath (line 445)

return the real path of a module

  • return: the corresponding path
  • access: public
string getModulePath (string $module)
  • string $module: a module name
getPlugin (line 408)

gets a given 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 279)

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

Responses object should take care of the errorMessages property to display errors.

  • since: 1.1
  • access: public
void handleError (string $toDo, string $type, integer $code, string $message, string $file, integer $line, array $trace)
  • string $toDo: a string which contains keyword indicating what to do with the error
  • 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
initDefaultResponseOfRequest (line 245)

instancy a response object corresponding to the default response type

of the current resquest

  • return: error string or false
  • access: public
mixed initDefaultResponseOfRequest ([boolean $originalResponse = false])
  • boolean $originalResponse: TRUE to get the original, non overloaded response
isModuleEnabled (line 435)

Says if the given module $name is enabled

  • return: true : module is ok
  • access: public
boolean isModuleEnabled (string $moduleName)
  • string $moduleName
isPluginEnabled (line 426)

Says if the given plugin $name is enabled

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

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 Thu, 22 Mar 2012 22:14:31 +0100 by phpDocumentor 1.4.3