public function __construct(array $values)
{
if (isset($values['scope'])) {
if ($values['scope'] === 'prototype') {
$this->scope = Scope::PROTOTYPE;
} elseif ($values['scope'] === 'singleton') {
$this->scope = Scope::SINGLETON;
} else {
throw new UnexpectedValueException(sprintf("Value '%s' is not a valid scope", $values['scope']));
}
}
if (isset($values['lazy'])) {
$this->lazy = (bool) $values['lazy'];
}
}