Assuming your application has an entity MyModule\Entity\Article
, a DB table article
and a DB
connection service 'Zend\Db\Adapter\AdapterInterface'
, you will now be able to retrieve table
gateways for each entity in namespace MyModule\Entity
as following:
<?php
$articles = $serviceManager->get('MyModule\TableGateway\Article');
$comments = $serviceManager->get('MyModule\TableGateway\Comment');
// profit!