PHP Класс Jelix\Core\AppInstance

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$appPath
$config object containing all configuration options of the application
$configAutoloader
$configPath
$env
$logPath
$router Jelix\Routing\Router The current router
$scriptPath
$tempBasePath
$varPath
$wwwPath

Защищенные свойства (Protected)

Свойство Тип Описание
$_allModulesPath
$_allPluginsPath
$_modulesContext
$_modulesDirPath
$_modulesPath
$_pluginsDirPath
$_version

Открытые методы

Метод Описание
__clone ( )
__construct ( string $appPath, string $wwwPath = null, string $varPath = null, string $logPath = null, string $configPath = null, string $scriptPath = null ) initialize the application paths.
__destruct ( )
clearModulesPluginsPath ( )
declareModule ( $modulePath ) declare a module.
declareModulesDir ( string | array $basePath, $modules = null ) Declare a list of modules.
declarePluginsDir ( string | string[] $basePath ) Declare a directory containing some plugins. Note that it does not need to declare 'plugins/' inside modules, as there are declared automatically when you declare modules.
getAllModulesPath ( ) : string[] returns all modules path, even those are not used by the application.
getAllPluginsPath ( ) : string[] return all paths of directories containing plugins, even those which are in disabled modules.
getCurrentModule ( ) : string get the module name of the current context.
getDeclaredModulesDir ( )
getModulePath ( string $module, boolean $includingExternal = false ) : string return the real path of an enabled module.
includePlugin ( string $name, string $type, string $suffix, string $classname ) : boolean include the file of a plugin from a plugin directory (any type of plugins).
isModuleEnabled ( string $moduleName, boolean $includingExternal = false ) : boolean Says if the given module $name is enabled.
loadPlugin ( string $name, string $type, string $suffix, string $classname, mixed $constructArg = null ) : null | object load a plugin from a plugin directory (any type of plugins).
onRestoringAsContext ( )
popCurrentModule ( ) : string cancel the current context and set the context to the previous module.
pushCurrentModule ( string $module ) set the context to the given module.
setConfig ( $config )
setPaths ( $appPath, $wwwPath = null, $varPath = null, $logPath = null, $configPath = null, $scriptPath = null )
version ( ) : string return the version of the application containing into a VERSION file It doesn't read the version from project.xml or composer.json.

Защищенные методы

Метод Описание
registerAutoload ( )
unregisterAutoload ( )

Описание методов

__clone() публичный Метод

public __clone ( )

__construct() публичный Метод

Warning: given paths should be ended by a directory separator.
public __construct ( string $appPath, string $wwwPath = null, string $varPath = null, string $logPath = null, string $configPath = null, string $scriptPath = null )
$appPath string application directory
$wwwPath string www directory
$varPath string var directory
$logPath string log directory
$configPath string config directory
$scriptPath string scripts directory

__destruct() публичный Метод

public __destruct ( )

clearModulesPluginsPath() публичный Метод

declareModule() публичный Метод

declare a module.
public declareModule ( $modulePath )

declareModulesDir() публичный Метод

Declare a list of modules.
public declareModulesDir ( string | array $basePath, $modules = null )
$basePath string | array the directory path containing modules that can be used

declarePluginsDir() публичный Метод

Declare a directory containing some plugins. Note that it does not need to declare 'plugins/' inside modules, as there are declared automatically when you declare modules.
public declarePluginsDir ( string | string[] $basePath )
$basePath string | string[] the directory path containing plugins that can be used

getAllModulesPath() публичный Метод

returns all modules path, even those are not used by the application.
public getAllModulesPath ( ) : string[]
Результат string[] keys are module name, values are paths

getAllPluginsPath() публичный Метод

return all paths of directories containing plugins, even those which are in disabled modules.
public getAllPluginsPath ( ) : string[]
Результат string[]

getCurrentModule() публичный Метод

get the module name of the current context.
public getCurrentModule ( ) : string
Результат string name of the current module

getDeclaredModulesDir() публичный Метод

getModulePath() публичный Метод

return the real path of an enabled module.
public getModulePath ( string $module, boolean $includingExternal = false ) : string
$module string a module name
$includingExternal boolean true if we want the path of a module enabled in an other entry point.
Результат string the corresponding path

includePlugin() публичный Метод

include the file of a plugin from a plugin directory (any type of plugins).
public includePlugin ( string $name, string $type, string $suffix, string $classname ) : boolean
$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
Результат boolean true if the plugin exists

isModuleEnabled() публичный Метод

Says if the given module $name is enabled.
public isModuleEnabled ( string $moduleName, boolean $includingExternal = false ) : boolean
$moduleName string
$includingExternal boolean true if we want to know if the module is also an external module, e.g. in an other entry point
Результат boolean true : module is ok

loadPlugin() публичный Метод

load a plugin from a plugin directory (any type of plugins).
public loadPlugin ( string $name, string $type, string $suffix, string $classname, mixed $constructArg = null ) : null | object
$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
$constructArg mixed the single argument for the constructor of the class. null = no argument.
Результат null | object null if the plugin doesn't exists

onRestoringAsContext() публичный Метод

popCurrentModule() публичный Метод

cancel the current context and set the context to the previous module.
public popCurrentModule ( ) : string
Результат string the obsolet module name

pushCurrentModule() публичный Метод

set the context to the given module.
public pushCurrentModule ( string $module )
$module string the module name

registerAutoload() защищенный Метод

protected registerAutoload ( )

setConfig() публичный Метод

public setConfig ( $config )

setPaths() публичный Метод

public setPaths ( $appPath, $wwwPath = null, $varPath = null, $logPath = null, $configPath = null, $scriptPath = null )

unregisterAutoload() защищенный Метод

protected unregisterAutoload ( )

version() публичный Метод

return the version of the application containing into a VERSION file It doesn't read the version from project.xml or composer.json.
public version ( ) : string
Результат string

Описание свойств

$_allModulesPath защищенное свойство

protected $_allModulesPath

$_allPluginsPath защищенное свойство

protected $_allPluginsPath

$_modulesContext защищенное свойство

protected $_modulesContext

$_modulesDirPath защищенное свойство

protected $_modulesDirPath

$_modulesPath защищенное свойство

protected $_modulesPath

$_pluginsDirPath защищенное свойство

protected $_pluginsDirPath

$_version защищенное свойство

protected $_version

$appPath публичное свойство

public $appPath

$config публичное свойство

object containing all configuration options of the application
public $config

$configAutoloader публичное свойство

public $configAutoloader

$configPath публичное свойство

public $configPath

$env публичное свойство

public $env

$logPath публичное свойство

public $logPath

$router публичное свойство

The current router
public Router,Jelix\Routing $router
Результат Jelix\Routing\Router

$scriptPath публичное свойство

public $scriptPath

$tempBasePath публичное свойство

public $tempBasePath

$varPath публичное свойство

public $varPath

$wwwPath публичное свойство

public $wwwPath