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|object  $config, [boolean $enableErrorHandler = true])
string getModulePath (string $module, [boolean $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])
boolean isModuleEnabled (string $moduleName, [boolean $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 60)

the current action name

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

the current error message

  • access: protected
array $initErrorMessages = array() (line 66)

List of all errors appears during the initialisation

  • var: array of jLogErrorMessage
  • access: protected
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 80)
jCoordinator __construct (string|object  $config, [boolean $enableErrorHandler = true])
  • string|object $config: filename of the ini file to configure the framework, or the config object itself
  • 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

Redefined in descendants as:
getErrorMessage (line 346)
  • return: the current error
  • since: 1.3a1
  • access: public
jLogErrorMessage getErrorMessage ()
getGenericErrorMessage (line 334)

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 399)

return the real path of a module

  • return: the corresponding path
  • access: public
string getModulePath (string $module, [boolean $includingExternal = false])
  • string $module: a module name
  • boolean $includingExternal: true if we want to know if the module is also an external module, e.g. in an other entry point
getPlugin (line 356)

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 269)

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 247)

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 385)

Says if the given module $name is enabled

  • return: true : module is ok
  • access: public
boolean isModuleEnabled (string $moduleName, [boolean $includingExternal = false])
  • string $moduleName
  • boolean $includingExternal: true if we want to know if the module is also an external module, e.g. in an other entry point
isPluginEnabled (line 374)

Says if the given coordinator plugin $name is enabled

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

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 Wed, 24 Sep 2014 21:57:05 +0200 by phpDocumentor 1.4.3