The documentation you are viewing is for an older version of this component.
Switch to the latest (v4) version.
dot-annotated-services
is based on 2 reusable factories - AttributedRepositoryFactory
and AttributedServiceFactory
- able to inject any dependency into a class.
Injects entity repositories into a class.
Dot\AnnotatedServices\Exception\RuntimeException
if repository does not existDot\AnnotatedServices\Exception\RuntimeException
if repository does not extend Doctrine\ORM\EntityRepository
Dot\AnnotatedServices\Exception\RuntimeException
if repository does not have #[Entity]
attributePsr\Container\NotFoundExceptionInterface
if Doctrine\ORM\EntityManagerInterface
does not exist in the service containerPsr\Container\ContainerExceptionInterface
if service manager is unable to provide an instance of Doctrine\ORM\EntityManagerInterface
Injects class dependencies into classes.
If a dependency is specified using the dot notation, AttributedServiceFactory
will try to load a service having that specific alias.
If it does not find one, it will try to load the dependency as a config tree, checking each segment if it's available in the service container.
Dot\AnnotatedServices\Exception\RuntimeException
if service does not existDot\AnnotatedServices\Exception\RuntimeException
if service does not have #[Inject]
attribute on it's constructorDot\AnnotatedServices\Exception\RuntimeException
if service tries to inject itself recursivelyPsr\Container\NotFoundExceptionInterface
if a dependency does not exist in the service containerPsr\Container\ContainerExceptionInterface
if service manager is unable to provide an instance of a dependency