return $this->container->
get($name);
} protected function resetService($name): void
{ if (!
$this->container->
initialized($name)) { return;
} $manager =
$this->container->
get($name);
if ($manager instanceof LazyObjectInterface
) { if (!
$manager->
resetLazyObject()) { throw new \
LogicException(sprintf('Resetting a non-lazy manager service is not supported. Declare the "%s" service as lazy.',
$name));
} return;
} if (!
$manager instanceof LazyLoadingInterface
) { throw new \
LogicException(sprintf('Resetting a non-lazy manager service is not supported. Declare the "%s" service as lazy.',
$name));
} if ($manager instanceof GhostObjectInterface
) { throw new \
LogicException('Resetting a lazy-ghost-object manager service is not supported.'
);
}