Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Sebastian Buckpesch

Hi there, I have a short question you might can help me with. Unfortunately there seems to be no other dev chat for ZF. I'm upgrading my ZF2 app and want to resolve the service locator dependencies by injecting them via Factory. So the documentation http://zendframework.github.io/zend-mvc/migration/to-v2-7/#servicelocatoraware-initializers states:

use Interop\Container\ContainerInterface;

class YourControllerFactory
    public function __invoke(ContainerInterface $container)
        return new YourController($container->get('Db\ApplicationAdapter'));

So in this example there is a container interface in use, which I can get my Service manager object from. But what is that interface? Why does it provide the Service Manager get method? How do I implement it in my application?