$application=new TApplication($configFile);
$application->run();
显示文件
Open project: pradosoft/prado
Method | Description | |
---|---|---|
__construct ( $basePath = 'protected', $cacheConfig = true, $configType = self::CONFIG_TYPE_XML ) | Constructor. | |
applyConfiguration ( $config, $withinService = false ) | Applies an application configuration. | |
clearGlobalState ( $key ) | Clears a global value. | |
completeRequest ( ) | Completes current request processing. | |
flushOutput ( $continueBuffering = true ) | Flushes output to client side. | |
getApplicationStatePersister ( ) : prado\IStatePersister | ||
getAssetManager ( ) : |
||
getAuthorizationRules ( ) : TAuthorizationRuleCollection | ||
getBasePath ( ) : string | ||
getCache ( ) : ICache | ||
getConfigurationFile ( ) : string | ||
getConfigurationFileExt ( ) : string | ||
getConfigurationFileName ( ) : string | ||
getConfigurationType ( ) : string | ||
getErrorHandler ( ) : |
||
getGlobalState ( $key, $defaultValue = null ) : mixed | Returns a global value. | |
getGlobalization ( $createIfNotExists = true ) : |
||
getID ( ) : string | ||
getMode ( ) : |
||
getModule ( $id ) : prado\IModule | ||
getModules ( ) : array | Returns a list of application modules indexed by module IDs. | |
getPageServiceID ( ) : string | ||
getParameters ( ) : |
Returns the list of application parameters. | |
getRequest ( ) : |
||
getRequestCompleted ( ) : boolean | ||
getResponse ( ) : |
||
getRuntimePath ( ) : string | ||
getSecurityManager ( ) : |
||
getService ( ) : prado\IService | ||
getSession ( ) : |
||
getUniqueID ( ) : string | ||
getUser ( ) : IUser | ||
onAuthentication ( ) | Raises OnAuthentication event. | |
onAuthenticationComplete ( ) | Raises OnAuthenticationComplete event. | |
onAuthorization ( ) | Raises OnAuthorization event. | |
onAuthorizationComplete ( ) | Raises OnAuthorizationComplete event. | |
onBeginRequest ( ) | Raises OnBeginRequest event. | |
onEndRequest ( ) | Raises OnEndRequest event. | |
onError ( $param ) | Raises OnError event. | |
onLoadState ( ) | Raises OnLoadState event. | |
onLoadStateComplete ( ) | Raises OnLoadStateComplete event. | |
onPreFlushOutput ( ) | Raises OnPreFlushOutput event. | |
onPreRunService ( ) | Raises OnPreRunService event. | |
onSaveState ( ) | Raises OnSaveState event. | |
onSaveStateComplete ( ) | Raises OnSaveStateComplete event. | |
run ( ) | Executes the lifecycles of the application. | |
runService ( ) | Runs the requested service. | |
setApplicationStatePersister ( prado\IStatePersister $persister ) | ||
setAssetManager ( |
||
setBasePath ( $value ) | ||
setCache ( Prado\Caching\ICache $cache ) | ||
setConfigurationFile ( $value ) | ||
setConfigurationType ( $value ) | ||
setErrorHandler ( |
||
setGlobalState ( $key, $value, $defaultValue = null, $forceSave = false ) | Sets a global value. | |
setGlobalization ( |
||
setID ( $value ) | ||
setMode ( $value ) | ||
setModule ( $id, prado\IModule $module = null ) | Adds a module to application. | |
setPageServiceID ( $value ) | ||
setRequest ( |
||
setResponse ( |
||
setRuntimePath ( $value ) | ||
setSecurityManager ( |
||
setService ( $value ) | ||
setSession ( |
||
setUser ( Prado\Security\IUser $user ) | ||
startService ( $serviceID ) | Starts the specified service. |
Method | Description | |
---|---|---|
getApplicationConfigurationClass ( ) | ||
initApplication ( ) | Loads configuration and initializes application. | |
internalLoadModule ( $id, $force = false ) | ||
loadGlobals ( ) | Loads global values from persistent storage. | |
resolvePaths ( $basePath ) | Resolves application-relevant paths. | |
saveGlobals ( ) | Saves global values into persistent storage. |
public __construct ( $basePath = 'protected', $cacheConfig = true, $configType = self::CONFIG_TYPE_XML ) |
public applyConfiguration ( $config, $withinService = false ) |
public clearGlobalState ( $key ) |
public completeRequest ( ) |
public flushOutput ( $continueBuffering = true ) |
public getApplicationStatePersister ( ) : prado\IStatePersister | ||
return | prado\IStatePersister | application state persister |
public getAssetManager ( ) : |
||
return | asset manager |
public getAuthorizationRules ( ) : TAuthorizationRuleCollection | ||
return | TAuthorizationRuleCollection | list of authorization rules for the current request |
public getBasePath ( ) : string | ||
return | string | the directory containing the application configuration file (absolute path) |
public getCache ( ) : ICache | ||
return | ICache | the cache module, null if cache module is not installed |
public getConfigurationFile ( ) : string | ||
return | string | the application configuration file (absolute path) |
public getConfigurationFileExt ( ) : string | ||
return | string | the application configuration type. default is 'xml' |
public getConfigurationFileName ( ) : string | ||
return | string | the default configuration file name |
public getConfigurationType ( ) : string | ||
return | string | the application configuration file (absolute path) |
public getErrorHandler ( ) : |
||
return | the error handler module |
public getGlobalState ( $key, $defaultValue = null ) : mixed | ||
return | mixed | the global value corresponding to $key |
public getGlobalization ( $createIfNotExists = true ) : |
||
return | globalization module |
public getMode ( ) : |
||
return | application mode. Defaults to TApplicationMode::Debug. |
public getModule ( $id ) : prado\IModule | ||
return | prado\IModule | the module with the specified ID, null if not found |
public getModules ( ) : array | ||
return | array | list of loaded application modules, indexed by module IDs |
public getParameters ( ) : |
||
return | the list of application parameters |
public getRequest ( ) : |
||
return | the request module |
public getRequestCompleted ( ) : boolean | ||
return | boolean | whether the current request is processed. |
public getResponse ( ) : |
||
return | the response module |
public getRuntimePath ( ) : string | ||
return | string | the directory storing cache data and application-level persistent data. (absolute path) |
public getSecurityManager ( ) : |
||
return | the security manager module |
public getService ( ) : prado\IService | ||
return | prado\IService | the currently requested service |
public getSession ( ) : |
||
return | the session module, null if session module is not installed |
public getUniqueID ( ) : string | ||
return | string | an ID that uniquely identifies this Prado application from the others |
protected initApplication ( ) |
protected loadGlobals ( ) |
public onAuthentication ( ) |
public onAuthenticationComplete ( ) |
public onAuthorization ( ) |
public onAuthorizationComplete ( ) |
public onBeginRequest ( ) |
public onEndRequest ( ) |
public onError ( $param ) |
public onLoadState ( ) |
public onLoadStateComplete ( ) |
public onPreFlushOutput ( ) |
public onPreRunService ( ) |
public onSaveState ( ) |
public onSaveStateComplete ( ) |
protected resolvePaths ( $basePath ) |
public run ( ) |
protected saveGlobals ( ) |
public setApplicationStatePersister ( prado\IStatePersister $persister ) | ||
$persister | prado\IStatePersister |
public setAssetManager ( |
||
$value |
public setCache ( Prado\Caching\ICache $cache ) | ||
$cache | Prado\Caching\ICache |
public setErrorHandler ( |
||
$handler |
public setGlobalState ( $key, $value, $defaultValue = null, $forceSave = false ) |
public setGlobalization ( |
||
$glob |
public setModule ( $id, prado\IModule $module = null ) | ||
$module | prado\IModule |
public setRequest ( |
||
$request |
public setResponse ( |
||
$response |
public setSecurityManager ( |
||
$sm |
public setSession ( |
||
$session |
public startService ( $serviceID ) |