Class jApp

Description

Located in /core/jApp.class.php (line 16)


	
			
Variable Summary
static mixed $appPath
static mixed $configAutoloader
static mixed $configPath
static mixed $contextBackup
static mixed $env
static mixed $logPath
static mixed $scriptPath
static mixed $tempBasePath
static mixed $varPath
static mixed $wwwPath
static object object $_config
static mixed $_coord
static mixed $_isInit
Method Summary
static void appPath ([ $file = ''])
static object object config ()
static void configPath ([ $file = ''])
static void coord ()
static string getModulePath (string $module, [boolean $includingExternal = false])
static void initLegacy ()
static void initPaths (string $appPath, [string $wwwPath = null], [string $varPath = null], [string $logPath = null], [string $configPath = null], [string $scriptPath = null])
static boolean isInit ()
static boolean isModuleEnabled (string $moduleName, [boolean $includingExternal = false])
static void loadConfig (string|object  $configFile, [boolean $enableErrorHandler = true])
static null|object loadPlugin (string $name, string $type, string $suffix, string $classname, [mixed $args = null])
static void logPath ([ $file = ''])
static void restoreContext ()
static void saveContext ()
static void scriptsPath ([ $file = ''])
static void setConfig ( $config)
static void setCoord ( $coord)
static void setEnv ( $env)
static void setTempBasePath ( $path)
static void tempBasePath ()
static void tempPath ([ $file = ''])
static void varPath ([ $file = ''])
static void wwwPath ([ $file = ''])
Variables
static mixed $appPath = '' (line 20)
  • access: protected
static mixed $configAutoloader = null (line 36)
  • access: protected
static mixed $configPath = '' (line 26)
  • access: protected
static mixed $contextBackup = array() (line 186)
  • access: protected
static mixed $env = 'www/' (line 34)
  • access: protected
static mixed $logPath = '' (line 24)
  • access: protected
static mixed $scriptPath = '' (line 30)
  • access: protected
static mixed $tempBasePath = '' (line 18)
  • access: protected
static mixed $varPath = '' (line 22)
  • access: protected
static mixed $wwwPath = '' (line 28)
  • access: protected
static object object $_config = null (line 131)
  • var: containing all configuration options of the application
  • access: protected
static mixed $_coord = null (line 176)
  • access: protected
static mixed $_isInit = false (line 32)
  • access: protected
Methods
static appPath (line 109)
  • access: public
static void appPath ([ $file = ''])
  • $file
static config (line 136)
  • return: containing all configuration options of the application
  • access: public
static object object config ()
static configPath (line 112)
  • access: public
static void configPath ([ $file = ''])
  • $file
static coord (line 178)
  • access: public
static void coord ()
static getModulePath (line 268)

return the real path of a module

  • return: the corresponding path
  • access: public
static 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
static initLegacy (line 79)

init path from JELIX_APP_* defines or define JELIX_APP_*, depending of how the bootstrap has been initialized.

The goal of this method is to support the transition between the old way of defining path, and the new way in jelix 1.3.

  • deprecated:
  • access: public
static void initLegacy ()
static initPaths (line 49)

initialize the application paths

Warning: given paths should be ended by a directory separator.

  • access: public
static void initPaths (string $appPath, [string $wwwPath = null], [string $varPath = null], [string $logPath = null], [string $configPath = null], [string $scriptPath = null])
  • string $appPath: application directory
  • string $wwwPath: www directory
  • string $varPath: var directory
  • string $logPath: log directory
  • string $configPath: config directory
  • string $scriptPath: scripts directory
static isInit (line 69)

indicate if path have been set

  • return: true if it is ok
  • access: public
static boolean isInit ()
static isModuleEnabled (line 252)

Says if the given module $name is enabled

  • return: true : module is ok
  • access: public
static 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
static loadConfig (line 165)

Load the configuration from the given file.

Call it after initPaths

  • access: public
static void loadConfig (string|object  $configFile, [boolean $enableErrorHandler = true])
  • string|object $configFile: name of the ini file to configure the framework or a configuration object
  • 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
static loadPlugin (line 226)

load a plugin from a plugin directory (any type of plugins)

  • return: null if the plugin doesn't exists
  • access: public
static null|object loadPlugin (string $name, string $type, string $suffix, string $classname, [mixed $args = null])
  • string $name: the name of the plugin
  • string $type: the type of the plugin
  • string $suffix: the suffix of the filename
  • string $classname: the name of the class to instancy
  • mixed $args: the argument for the constructor of the class. null = no argument.
static logPath (line 111)
  • access: public
static void logPath ([ $file = ''])
  • $file
static restoreContext (line 208)

restore the previous context of the application

  • access: public
static void restoreContext ()
static saveContext (line 192)

save all path and others variables relatives to the application, so you can

temporary change the context to an other application

  • access: public
static void saveContext ()
static scriptsPath (line 114)
  • access: public
static void scriptsPath ([ $file = ''])
  • $file
static setConfig (line 140)
  • access: public
static void setConfig ( $config)
  • $config
static setCoord (line 182)
  • access: public
static void setCoord ( $coord)
  • $coord
static setEnv (line 122)
  • access: public
static void setEnv ( $env)
  • $env
static setTempBasePath (line 118)
  • access: public
static void setTempBasePath ( $path)
  • $path
static tempBasePath (line 116)
  • access: public
static void tempBasePath ()
static tempPath (line 115)
  • access: public
static void tempPath ([ $file = ''])
  • $file
static varPath (line 110)
  • access: public
static void varPath ([ $file = ''])
  • $file
static wwwPath (line 113)
  • access: public
static void wwwPath ([ $file = ''])
  • $file

Documentation generated on Mon, 26 Oct 2015 21:51:34 +0100 by phpDocumentor 1.4.3