Download the PHP package docteurklein/repository-service-bundle without Composer
On this page you can find all versions of the php package docteurklein/repository-service-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download docteurklein/repository-service-bundle
More information about docteurklein/repository-service-bundle
Files in docteurklein/repository-service-bundle
Package repository-service-bundle
Short Description A symfony bundle to help you register automatically doctrine ORM repositories as services
License MIT
Informations about the package repository-service-bundle
RepositoryServiceBundle
What ?
A symfony bundle that eases creation of doctrine ORM repositories as services.
It will create a service for each registered entity in the default entity manager.
If you provide a repository
tag for a service, it will automatically create an alias and configure doctrine to make it the custom repository class of the associated entity (specified by the for
attribute).
How ?
install
composer require docteurklein/repository-service-bundle
register the bundle
Examples
Note: The following examples use JmsDiExtraBundle to simplify code.
Given an entity:
And the following service:
Then the DIC contains a factory service named repo.model_product
for the repository (using ManagerRegistry::getRepository()
).
It also contains an alias named products
pointing to the repo.model_product
service.
The custom repository class is automatically configured to point to Repository\\Products
.
All versions of repository-service-bundle with dependencies
symfony/http-kernel Version ^2.0|^3.0
symfony/dependency-injection Version ^2.0|^3.0