// inconsistent results.
if ($this->locked
) { throw new AccessException('Default values cannot be set from a lazy option or normalizer.'
);
} // If an option is a closure that should be evaluated lazily, store it
// in the "lazy" property.
if ($value instanceof \Closure
) { $reflClosure =
new \
ReflectionFunction($value);
$params =
$reflClosure->
getParameters();
if (isset($params[0
]) && Options::
class === $this->
getParameterClassName($params[0
])) { // Initialize the option if no previous value exists
if (!
isset($this->defaults
[$option])) { $this->defaults
[$option] = null;
} // Ignore previous lazy options if the closure has no second parameter
if (!
isset($this->lazy
[$option]) || !
isset($params[1
])) { $this->lazy
[$option] =
[];
} // Store closure for later evaluation