A
A
Alexander Evgenievich2016-02-24 18:13:24
Zend Framework
Alexander Evgenievich, 2016-02-24 18:13:24

How to configure DI in ZF2?

Hello !
Using an example, please explain how to configure DI in ZF2, for example, here is the config in SF2:

services:
    sample_service:
         class: Sample\Namespace\Class
         arguments: [@entity_manager]

    need_inject_service:
        class: Need\Inject\Service
        arguments:
               - @sample_service
               - @entity_manager

And is there any service tagging at all, like in SF?
Off manual looked! That's why I'm asking for help with an example.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Shamanov, 2016-02-24
@SilenceOfWinter

And of. have you tried reading the manual? framework.zend.com/manual/current/en/modules/zend....

D
Denis, 2016-02-24
@prototype_denis

https://github.com/ralphschindler/Zend_DI-Examples

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question