protected parseScope ( string $value ) : integer | ||
$value | string | Value of the option |
return | integer | The scope translated into a Configuration::SCOPE_* constant |
protected function parseScope($value)
{
switch ($value) {
case 'singleton':
return Configuration::SCOPE_SINGLETON;
case 'prototype':
return Configuration::SCOPE_PROTOTYPE;
case 'session':
return Configuration::SCOPE_SESSION;
default:
throw new InvalidObjectConfigurationException('Invalid scope "' . $value . '"', 1167574991);
}
}