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 $modulesContext
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 getCurrentModule ()
static string getModulePath (string $module, [boolean $includingExternal = false])
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 string popCurrentModule ()
static void pushCurrentModule (string $module)
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 148)
  • access: protected
static mixed $env = 'www/' (line 34)
  • access: protected
static mixed $logPath = '' (line 24)
  • access: protected
static mixed $modulesContext = array() (line 245)
  • 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 93)
  • var: containing all configuration options of the application
  • access: protected
static mixed $_coord = null (line 138)
  • access: protected
static mixed $_isInit = false (line 32)
  • access: protected
Methods
static appPath (line 71)
  • access: public
static void appPath ([ $file = ''])
  • $file
static config (line 98)
  • return: containing all configuration options of the application
  • access: public
static object object config ()
static configPath (line 74)
  • access: public
static void configPath ([ $file = ''])
  • $file
static coord (line 140)
  • access: public
static void coord ()
static getCurrentModule (line 267)

get the module name of the current context

  • return: name of the current module
static string getCurrentModule ()
static getModulePath (line 232)

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

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

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

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 73)
  • access: public
static void logPath ([ $file = ''])
  • $file
static popCurrentModule (line 259)

cancel the current context and set the context to the previous module

  • return: the obsolet module name
static string popCurrentModule ()
static pushCurrentModule (line 251)

set the context to the given module

static void pushCurrentModule (string $module)
  • string $module: the module name
static restoreContext (line 172)

restore the previous context of the application

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

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 76)
  • access: public
static void scriptsPath ([ $file = ''])
  • $file
static setConfig (line 102)
  • access: public
static void setConfig ( $config)
  • $config
static setCoord (line 144)
  • access: public
static void setCoord ( $coord)
  • $coord
static setEnv (line 84)
  • access: public
static void setEnv ( $env)
  • $env
static setTempBasePath (line 80)
  • access: public
static void setTempBasePath ( $path)
  • $path
static tempBasePath (line 78)
  • access: public
static void tempBasePath ()
static tempPath (line 77)
  • access: public
static void tempPath ([ $file = ''])
  • $file
static varPath (line 72)
  • access: public
static void varPath ([ $file = ''])
  • $file
static wwwPath (line 75)
  • access: public
static void wwwPath ([ $file = ''])
  • $file

Documentation generated on Wed, 04 Jan 2017 22:52:02 +0100 by phpDocumentor 1.4.3