An abstract implementation of AbstractFactoryInterface to allow for easier creating *ModelTable* services, which are implementations of Zend\Db\TableGateway\AbstractTableGateway

package HexCommon

 Methods

Determine if we can create a model table service with $name

canCreateServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator, $name, $requestedName) : bool

Returns true if $name contains "ModelTable"

Parameters

$serviceLocator

\Zend\ServiceManager\ServiceLocatorInterface

$name

string

$requestedName

string

Returns

bool

Create a model table service with $name and seed it with the database adapter.

createServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator, $name, $requestedName) : mixed

Example: $name = 'blogModelTablePost'; will become: $class = 'Blog\Model\Table\Post';

Parameters

$serviceLocator

\Zend\ServiceManager\ServiceLocatorInterface

$name

string

$requestedName

string

Returns

mixed