public function __construct($contextString)
{
if (strstr($contextString, '/') === false) {
$this->rootContextString = $contextString;
$this->parentContext = null;
} else {
$contextStringParts = explode('/', $contextString);
$this->rootContextString = $contextStringParts[0];
array_pop($contextStringParts);
$this->parentContext = new ApplicationContext(implode('/', $contextStringParts));
}
if (!in_array($this->rootContextString, ['Development', 'Production', 'Testing'])) {
throw new FlowException('The given context "' . $contextString . '" was not valid. Only allowed are Development, Production and Testing, including their sub-contexts', 1335436551);
}
$this->contextString = $contextString;
}