как можно Я внедряю сервис в репозиторий сущностей Доктрина Symfony2?

как я могу внедрить службу в репозиторий сущностей с помощью внедрения зависимостей?

Я пробую вот так:

<service id="rp.repository.user" class="RP\CoreBundle\Repository\UserRepository" 
factory-service="doctrine.orm.entity_manager" factory-method="getRepository">
  <call method="setSecurityContext">
    <argument type="service" id="security.context"/>
  </call>
</service>

но setSecurityContext никогда не вызывается Пожалуйста, помогите

5
задан Steven Mercatante 3 February 2012 в 15:40
поделиться