![]() |
TYPO3
7.6
|
Public Member Functions | |
__construct ($contextString) | |
__toString () | |
isDevelopment () | |
isProduction () | |
isTesting () | |
getParent () | |
Protected Attributes | |
$contextString | |
$rootContextString | |
$parentContext | |
The TYPO3 Context object.
A TYPO3 Application context is something like "Production", "Development", "Production/StagingSystem", and is set using the TYPO3_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.
This class is derived from the TYPO3 Flow framework. Credits go to the respective authors.
Definition at line 33 of file ApplicationContext.php.
__construct | ( | $contextString | ) |
Initialize the context object.
string | $contextString |
\Exception | if the parent context is none of "Development", "Production" or "Testing" |
Definition at line 62 of file ApplicationContext.php.
References ApplicationContext\$contextString.
__toString | ( | ) |
Returns the full context string, for example "Development", or "Production/LiveSystem"
Definition at line 87 of file ApplicationContext.php.
References ApplicationContext\$contextString.
getParent | ( | ) |
Returns the parent context object, if any
Definition at line 132 of file ApplicationContext.php.
References ApplicationContext\$parentContext.
isDevelopment | ( | ) |
Returns TRUE if this context is the Development context or a sub-context of it
Definition at line 98 of file ApplicationContext.php.
isProduction | ( | ) |
Returns TRUE if this context is the Production context or a sub-context of it
Definition at line 110 of file ApplicationContext.php.
isTesting | ( | ) |
Returns TRUE if this context is the Testing context or a sub-context of it
Definition at line 121 of file ApplicationContext.php.
|
protected |
Definition at line 40 of file ApplicationContext.php.
Referenced by ApplicationContext\__construct(), and ApplicationContext\__toString().
|
protected |
Definition at line 54 of file ApplicationContext.php.
Referenced by ApplicationContext\getParent().
|
protected |
Definition at line 47 of file ApplicationContext.php.