jApp
in package
Tags
Table of Contents
- $_currentApp : jAppInstance
- $_mainConfigFile : mixed
- $contextBackup : mixed
- __callStatic() : mixed
- allows to call some methods on the current instance as static methods on jApp.
- app() : mixed
- appConfigPath() : string
- applicationInitFile() : mixed
- appPath() : mixed
- appSystemPath() : mixed
- clearModulesPluginsPath() : void
- config() : object
- configPath() : string
- coord() : jCoordinator
- declareModule() : void
- declareModulesDir() : void
- declareModulesFromConfig() : void
- declarePluginsDir() : void
- getAllModulesPath() : array<string|int, string>
- getAllPluginsPath() : array<string|int, string>
- getCurrentModule() : string
- getDeclaredModulesDir() : array<string|int, string>
- getEnabledModulesPaths() : array<string|int, string>
- getModulePath() : string
- includePlugin() : bool
- initPaths() : mixed
- initialize the application paths.
- isInit() : bool
- indicate if path have been set.
- isModuleEnabled() : bool
- loadConfig() : mixed
- Load the configuration from the given file.
- loadPlugin() : null|object
- logPath() : mixed
- mainConfigFile() : mixed
- Main config file path.
- popCurrentModule() : string
- pushCurrentModule() : void
- reloadServices() : void
- restoreContext() : mixed
- restore the previous context of the application.
- saveContext() : mixed
- save all path and others variables relatives to the application, so you can temporary change the context to an other application.
- scriptsPath() : string
- services() : Services
- setConfig() : void
- setCoord() : mixed
- setEnv() : mixed
- setTempBasePath() : mixed
- tempBasePath() : mixed
- tempPath() : mixed
- urlBasePath() : mixed
- urlJelixWWWPath() : mixed
- varConfigPath() : mixed
- varPath() : mixed
- version() : string
- return the version of the application containing into a VERSION file or from `jApp::config()->appVersion` (project.xml).
- wwwPath() : mixed
Properties
$_currentApp
protected
static jAppInstance
$_currentApp
Tags
$_mainConfigFile
protected
static mixed
$_mainConfigFile
Tags
$contextBackup
protected
static mixed
$contextBackup
= array()
Tags
Methods
__callStatic()
allows to call some methods on the current instance as static methods on jApp.
public
static __callStatic(mixed $name, mixed $arguments) : mixed
Parameters
- $name : mixed
- $arguments : mixed
Tags
Return values
mixed —app()
public
static app() : mixed
Tags
Return values
mixed —appConfigPath()
public
static appConfigPath([string $file = '' ]) : string
Parameters
- $file : string = ''
Tags
Return values
string —applicationInitFile()
public
static applicationInitFile() : mixed
Tags
Return values
mixed —appPath()
public
static appPath([mixed $file = '' ]) : mixed
Parameters
- $file : mixed = ''
Tags
Return values
mixed —appSystemPath()
public
static appSystemPath([mixed $file = '' ]) : mixed
Parameters
- $file : mixed = ''
Tags
Return values
mixed —clearModulesPluginsPath()
public
static clearModulesPluginsPath() : void
Return values
void —config()
public
static config() : object
Tags
Return values
object —object containing all configuration options of the application
configPath()
public
static configPath([string $file = '' ]) : string
Parameters
- $file : string = ''
Tags
Return values
string —coord()
public
static coord() : jCoordinator
Tags
Return values
jCoordinator —declareModule()
public
static declareModule(mixed $modulePath) : void
Parameters
- $modulePath : mixed
Return values
void —declareModulesDir()
public
static declareModulesDir(mixed $basePath, mixed $modules) : void
Parameters
- $basePath : mixed
- $modules : mixed
Return values
void —declareModulesFromConfig()
public
static declareModulesFromConfig(mixed $config) : void
Parameters
- $config : mixed
Return values
void —declarePluginsDir()
public
static declarePluginsDir(mixed $basePath) : void
Parameters
- $basePath : mixed
Return values
void —getAllModulesPath()
public
static getAllModulesPath() : array<string|int, string>
Return values
array<string|int, string> —getAllPluginsPath()
public
static getAllPluginsPath() : array<string|int, string>
Return values
array<string|int, string> —getCurrentModule()
public
static getCurrentModule() : string
Return values
string —getDeclaredModulesDir()
public
static getDeclaredModulesDir() : array<string|int, string>
Return values
array<string|int, string> —getEnabledModulesPaths()
public
static getEnabledModulesPaths() : array<string|int, string>
Return values
array<string|int, string> —getModulePath()
public
static getModulePath(mixed $module, mixed $includingExternal) : string
Parameters
- $module : mixed
- $includingExternal : mixed
Return values
string —includePlugin()
public
static includePlugin(mixed $name, mixed $type, mixed $suffix, mixed $classname) : bool
Parameters
- $name : mixed
- $type : mixed
- $suffix : mixed
- $classname : mixed
Return values
bool —initPaths()
initialize the application paths.
public
static initPaths(string $appPath[, string $wwwPath = null ][, string $varPath = null ][, string $logPath = null ][, string $configPath = null ][, string $scriptPath = null ]) : mixed
Warning: given paths should be ended by a directory separator.
Parameters
- $appPath : string
-
application directory
- $wwwPath : string = null
-
www directory
- $varPath : string = null
-
var directory
- $logPath : string = null
-
log directory
- $configPath : string = null
-
var config directory
- $scriptPath : string = null
-
scripts directory (deprecated)
Tags
Return values
mixed —isInit()
indicate if path have been set.
public
static isInit() : bool
Tags
Return values
bool —true if it is ok
isModuleEnabled()
public
static isModuleEnabled(mixed $moduleName, mixed $includingExternal) : bool
Parameters
- $moduleName : mixed
- $includingExternal : mixed
Return values
bool —loadConfig()
Load the configuration from the given file.
public
static loadConfig(object|string $configFile[, bool $enableErrorHandler = true ]) : mixed
Call it after initPaths
Parameters
- $configFile : object|string
-
name of the ini file to configure the framework or a configuration object
- $enableErrorHandler : bool = true
-
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
Tags
Return values
mixed —loadPlugin()
public
static loadPlugin(mixed $name, mixed $type, mixed $suffix, mixed $classname, mixed $args) : null|object
Parameters
- $name : mixed
- $type : mixed
- $suffix : mixed
- $classname : mixed
- $args : mixed
Return values
null|object —logPath()
public
static logPath([mixed $file = '' ]) : mixed
Parameters
- $file : mixed = ''
Tags
Return values
mixed —mainConfigFile()
Main config file path.
public
static mainConfigFile() : mixed
Tags
Return values
mixed —popCurrentModule()
public
static popCurrentModule() : string
Return values
string —pushCurrentModule()
public
static pushCurrentModule(mixed $module) : void
Parameters
- $module : mixed
Return values
void —reloadServices()
public
static reloadServices() : void
Return values
void —restoreContext()
restore the previous context of the application.
public
static restoreContext() : mixed
Tags
Return values
mixed —saveContext()
save all path and others variables relatives to the application, so you can temporary change the context to an other application.
public
static saveContext() : mixed
Tags
Return values
mixed —scriptsPath()
public
static scriptsPath([string $file = '' ]) : string
Parameters
- $file : string = ''
Tags
Return values
string —services()
public
static services() : Services
Return values
Services —setConfig()
public
static setConfig(mixed $config) : void
Parameters
- $config : mixed
Return values
void —setCoord()
public
static setCoord(jCoordinator $coord) : mixed
Parameters
- $coord : jCoordinator
Tags
Return values
mixed —setEnv()
public
static setEnv(mixed $env) : mixed
Parameters
- $env : mixed
Tags
Return values
mixed —setTempBasePath()
public
static setTempBasePath(mixed $path) : mixed
Parameters
- $path : mixed
Tags
Return values
mixed —tempBasePath()
public
static tempBasePath() : mixed
Tags
Return values
mixed —tempPath()
public
static tempPath([mixed $file = '' ]) : mixed
Parameters
- $file : mixed = ''
Tags
Return values
mixed —urlBasePath()
public
static urlBasePath() : mixed
Tags
Return values
mixed —urlJelixWWWPath()
public
static urlJelixWWWPath() : mixed
Tags
Return values
mixed —varConfigPath()
public
static varConfigPath([mixed $file = '' ]) : mixed
Parameters
- $file : mixed = ''
Tags
Return values
mixed —varPath()
public
static varPath([mixed $file = '' ]) : mixed
Parameters
- $file : mixed = ''
Tags
Return values
mixed —version()
return the version of the application containing into a VERSION file or from `jApp::config()->appVersion` (project.xml).
public
static version() : string
It doesn't read the version from composer.json.
Tags
Return values
string —wwwPath()
public
static wwwPath([mixed $file = '' ]) : mixed
Parameters
- $file : mixed = ''