static void
appPath
([ $file = ''])
static object object
config
()
static void
configPath
([ $file = ''])
get the module name of the current context
static string
getCurrentModule
()
return the real path of a module
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
initialize the application paths
Warning: given paths should be ended by a directory separator.
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
indicate if path have been set
static boolean
isInit
()
Says if the given module $name is enabled
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
Load the configuration from the given file.
Call it after initPaths
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
load a plugin from a plugin directory (any type of plugins)
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 void
logPath
([ $file = ''])
cancel the current context and set the context to the previous module
static string
popCurrentModule
()
set the context to the given module
static void
pushCurrentModule
(string $module)
-
string
$module: the module name
restore the previous context of the application
static void
restoreContext
()
save all path and others variables relatives to the application, so you can
temporary change the context to an other application
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 = ''])