for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace T4web\Migrations\Version;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\ServiceManager\AbstractPluginManager;
class TableFactory implements FactoryInterface
{
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return mixed
*/
public function createService(ServiceLocatorInterface $serviceLocator)
if ($serviceLocator instanceof AbstractPluginManager) {
$serviceLocator = $serviceLocator->getServiceLocator();
}
$tableGateway = $serviceLocator->get('T4web\Migrations\Version\TableGateway');
return new Table($tableGateway);