Jelix 1.6.40

jApp
in package

Tags
subpackage

core

Table of Contents

$_config  : object
$_coord  : jCoordinator
$_isInit  : mixed
$_mainConfigFile  : mixed
$applicationInitFile  : mixed
$appPath  : mixed
$configAutoloader  : mixed
$configPath  : mixed
$contextBackup  : mixed
$env  : mixed
$logPath  : mixed
$modulesContext  : mixed
$scriptPath  : mixed
$tempBasePath  : mixed
$varPath  : mixed
$wwwPath  : mixed
applicationInitFile()  : mixed
appPath()  : mixed
config()  : object
configPath()  : mixed
coord()  : jCoordinator
getCurrentModule()  : string
get the module name of the current context
getModulePath()  : string
return the real path of a module
initPaths()  : mixed
initialize the application paths
isInit()  : bool
indicate if path have been set
isModuleEnabled()  : bool
Says if the given module $name is enabled
loadConfig()  : mixed
Load the configuration from the given file.
loadPlugin()  : null|object
load a plugin from a plugin directory (any type of plugins)
logPath()  : mixed
mainConfigFile()  : mixed
Main config file path
popCurrentModule()  : string
cancel the current context and set the context to the previous module
pushCurrentModule()  : mixed
set the context to the given module
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()  : mixed
setApplicationInitFile()  : void
Sometimes, the application.init.php may not be into the appPath, this method allows to indicate the path to the application.init.php.
setConfig()  : mixed
setCoord()  : mixed
setEnv()  : mixed
setTempBasePath()  : mixed
tempBasePath()  : mixed
tempPath()  : mixed
urlBasePath()  : mixed
varPath()  : mixed
wwwPath()  : mixed

Properties

$_config

protected static object $_config = ull

object containing all configuration options of the application

$_mainConfigFile

protected static mixed $_mainConfigFile = ull

$applicationInitFile

protected static mixed $applicationInitFile = ''

$configAutoloader

protected static mixed $configAutoloader = ull

$configPath

protected static mixed $configPath = ''

$contextBackup

protected static mixed $contextBackup = array()

$modulesContext

protected static mixed $modulesContext = array()

$scriptPath

protected static mixed $scriptPath = ''

$tempBasePath

protected static mixed $tempBasePath = ''

Methods

applicationInitFile()

public static applicationInitFile() : mixed
Return values
mixed

appPath()

public static appPath([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

config()

public static config() : object
Return values
object

object containing all configuration options of the application

configPath()

public static configPath([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

getCurrentModule()

get the module name of the current context

public static getCurrentModule() : string
Return values
string

name of the current module

getModulePath()

return the real path of a module

public static getModulePath(string $module[, bool $includingExternal = false ]) : string
Parameters
$module : string

a module name

$includingExternal : bool = false

true if we want to know if the module is also an external module, e.g. in an other entry point

Tags
throws
Exception
Return values
string

the corresponding path

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

config directory

$scriptPath : string = null

scripts directory

Return values
mixed

isInit()

indicate if path have been set

public static isInit() : bool
Return values
bool

true if it is ok

isModuleEnabled()

Says if the given module $name is enabled

public static isModuleEnabled(string $moduleName[, bool $includingExternal = false ]) : bool
Parameters
$moduleName : string
$includingExternal : bool = false

true if we want to know if the module is also an external module, e.g. in an other entry point

Tags
throws
Exception
Return values
bool

true : module is ok

loadConfig()

Load the configuration from the given file.

public static loadConfig(string|object $configFile[, bool $enableErrorHandler = true ]) : mixed

Call it after initPaths

Parameters
$configFile : string|object

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

Return values
mixed

loadPlugin()

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

public static loadPlugin(string $name, string $type, string $suffix, string $classname[, mixed $args = null ]) : null|object
Parameters
$name : string

the name of the plugin

$type : string

the type of the plugin

$suffix : string

the suffix of the filename

$classname : string

the name of the class to instancy

$args : mixed = null

the argument for the constructor of the class. null = no argument.

Return values
null|object

null if the plugin doesn't exists

logPath()

public static logPath([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

mainConfigFile()

Main config file path

public static mainConfigFile() : mixed
Return values
mixed

popCurrentModule()

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

public static popCurrentModule() : string
Return values
string

the obsolet module name

pushCurrentModule()

set the context to the given module

public static pushCurrentModule(string $module) : mixed
Parameters
$module : string

the module name

Return values
mixed

restoreContext()

restore the previous context of the application

public static restoreContext() : mixed
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
Return values
mixed

scriptsPath()

public static scriptsPath([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

setApplicationInitFile()

Sometimes, the application.init.php may not be into the appPath, this method allows to indicate the path to the application.init.php.

public static setApplicationInitFile(string $path) : void
Parameters
$path : string

the full path to the application.init.php

Return values
void

setConfig()

public static setConfig(mixed $config) : mixed
Parameters
$config : mixed
Return values
mixed

setEnv()

public static setEnv(mixed $env) : mixed
Parameters
$env : mixed
Return values
mixed

setTempBasePath()

public static setTempBasePath(mixed $path) : mixed
Parameters
$path : mixed
Return values
mixed

tempBasePath()

public static tempBasePath() : mixed
Return values
mixed

tempPath()

public static tempPath([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

urlBasePath()

public static urlBasePath() : mixed
Return values
mixed

varPath()

public static varPath([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

wwwPath()

public static wwwPath([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

Search results