Le jeudi 4 septembre 2014 16:42:11 UTC+2, Sebastian Brandner a écrit :
>
> if i understand this correctly, it will require to define for every entity 
> and it's repo a service.
>
> it's a good solution but requires much maintainance if you have 20+ 
> entities.
>

It's a little more work when creating everything, but more inline with 
nowadays best practices
The repo definition are not so likely to change over time, so mot much 
maintainance once created
 

>
>
> thx for this hint, but i think i'll use the PHP 5.5 features of 
> MyClass::class predefined constant.
> this feels familiar because i develop with java at work.
>
> kr
> sebastian
>
> Am Donnerstag, 4. September 2014 16:28:24 UTC+2 schrieb Tom:
>>
>> Declare the entity classes in config files, inject the repositories with 
>> DI
>>
>> parameters:
>>     my.entity.class: MyNamespace\MyEntity
>>
>> service:
>>     my.repository:
>>         class: MyRepo
>>         factory_service: doctrine.orm.entity_manager
>>         factory_method: getRepository
>>         arguments:
>>             - %my.entity.class%
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to