public function setSubDefinition(Definition $definition)
{
if (!$definition instanceof self) {
return;
}
// The current prevails
if ($this->className === null) {
$this->setClassName($definition->className);
}
if ($this->scope === null) {
$this->scope = $definition->scope;
}
if ($this->lazy === null) {
$this->lazy = $definition->lazy;
}
// Merge constructor injection
$this->mergeConstructorInjection($definition);
// Merge property injections
$this->mergePropertyInjections($definition);
// Merge method injections
$this->mergeMethodInjections($definition);
}