PHP Класс Neos\Flow\Core\ApplicationContext

A Flow Application context is something like "Production", "Development", "Production/StagingSystem", and is set using the FLOW_CONTEXT environment variable. A context can contain arbitrary sub-contexts, which are delimited with slash ("Production/StagingSystem", "Production/Staging/Server1"). The top-level contexts, however, must be one of "Testing", "Development" and "Production". Mainly, you will use $context->isProduction(), $context->isTesting() and $context->isDevelopment() inside your custom code.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$contextString string The (internal) context string; could be something like "Development" or "Development/MyLocalMacBook"
$parentContext ApplicationContext The parent context, or NULL if there is no parent context
$rootContextString string The root context; must be one of "Development", "Testing" or "Production"

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

Метод Описание
__construct ( string $contextString ) Initialize the context object.
__toString ( ) : string Returns the full context string, for example "Development", or "Production/LiveSystem"
getParent ( ) : ApplicationContext Returns the parent context object, if any
isDevelopment ( ) : boolean Returns TRUE if this context is the Development context or a sub-context of it
isProduction ( ) : boolean Returns TRUE if this context is the Production context or a sub-context of it
isTesting ( ) : boolean Returns TRUE if this context is the Testing context or a sub-context of it

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

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

Initialize the context object.
public __construct ( string $contextString )
$contextString string

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

Returns the full context string, for example "Development", or "Production/LiveSystem"
public __toString ( ) : string
Результат string

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

Returns the parent context object, if any
public getParent ( ) : ApplicationContext
Результат ApplicationContext the parent context or NULL, if there is none

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

Returns TRUE if this context is the Development context or a sub-context of it
public isDevelopment ( ) : boolean
Результат boolean

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

Returns TRUE if this context is the Production context or a sub-context of it
public isProduction ( ) : boolean
Результат boolean

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

Returns TRUE if this context is the Testing context or a sub-context of it
public isTesting ( ) : boolean
Результат boolean

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

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

The (internal) context string; could be something like "Development" or "Development/MyLocalMacBook"
protected string $contextString
Результат string

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

The parent context, or NULL if there is no parent context
protected ApplicationContext,Neos\Flow\Core $parentContext
Результат ApplicationContext

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

The root context; must be one of "Development", "Testing" or "Production"
protected string $rootContextString
Результат string