PHP Класс Webiny\Component\Bootstrap\ApplicationClasses\Application

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( Environment $environment ) Base constructor.
getAbsolutePath ( ) : string Get application root absolute path.
getApplicationConfig ( string $query = '', null $default = null ) : mixed | ConfigObject Get the application configuration (config from App.yaml file).
getComponentConfig ( string $component, string $query = '', null $default = null ) : mixed | ConfigObject Get a component configuration (configurations from within the environment folder).
getEnvironmentConfig ( string $query = '', null $default = null ) : mixed | ConfigObject Returns the current environment configuration.
getEnvironmentName ( ) : string Get the name of current environment.
getNamespace ( ) : string Get application namespace.
getWebPath ( ) : string Get application web path.
httpResponse ( ) : Response | boolean Send the http response to the browser.
isProductionEnvironment ( ) : boolean Checks if current environment is Production.
showErrors ( ) : boolean Based on the current environment configuration, should system errors be shown or not.
view ( ) : View Get the view instance.

Приватные методы

Метод Описание
getTemplateEngineInstance ( ) : Webiny\Component\TemplateEngine\Bridge\TemplateEngineInterface Returns template engine instance, based on current configuration.

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

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

Base constructor.
public __construct ( Environment $environment )
$environment Webiny\Component\Bootstrap\Environment Current application environment.

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

Get application root absolute path.
public getAbsolutePath ( ) : string
Результат string

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

Get the application configuration (config from App.yaml file).
public getApplicationConfig ( string $query = '', null $default = null ) : mixed | ConfigObject
$query string Query inside the application config.
$default null Default value which should be returned if query has no matches.
Результат mixed | Webiny\Component\Config\ConfigObject

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

Get a component configuration (configurations from within the environment folder).
public getComponentConfig ( string $component, string $query = '', null $default = null ) : mixed | ConfigObject
$component string Component name.
$query string Query inside the component config.
$default null Default value which should be returned if query has no matches.
Результат mixed | Webiny\Component\Config\ConfigObject

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

Returns the current environment configuration.
public getEnvironmentConfig ( string $query = '', null $default = null ) : mixed | ConfigObject
$query string Query inside the environment configuration.
$default null Default value which should be returned if query has no matches.
Результат mixed | Webiny\Component\Config\ConfigObject

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

Get the name of current environment.
public getEnvironmentName ( ) : string
Результат string

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

Get application namespace.
public getNamespace ( ) : string
Результат string

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

Get application web path.
public getWebPath ( ) : string
Результат string

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

This method is called automatically by the Dispatcher.
public httpResponse ( ) : Response | boolean
Результат Webiny\Component\Http\Response | boolean

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

Checks if current environment is Production.
public isProductionEnvironment ( ) : boolean
Результат boolean

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

Based on the current environment configuration, should system errors be shown or not.
public showErrors ( ) : boolean
Результат boolean

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

Get the view instance.
public view ( ) : View
Результат View