PHP 클래스 Jelix\Core\AppInstance

파일 보기 프로젝트 열기: jelix/jelix

공개 프로퍼티들

프로퍼티 타입 설명
$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

보호된 프로퍼티들

프로퍼티 타입 설명
$_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