public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$config = $container->get('config');
$config = $config['zf-apigility']['db-connected'][$requestedName];
$table = $this->getTableGatewayFromConfig($config, $requestedName, $container);
$identifier = $this->getIdentifierFromConfig($config);
$collection = $this->getCollectionFromConfig($config, $requestedName);
$resourceClass = $this->getResourceClassFromConfig($config, $requestedName);
return new $resourceClass($table, $identifier, $collection);
}