Skip to content
Snippets Groups Projects
Commit 7a11094d authored by Demian Katz's avatar Demian Katz
Browse files

Eliminate redundant factories.

parent edf5a2d2
No related merge requests found
...@@ -298,7 +298,7 @@ $config = [ ...@@ -298,7 +298,7 @@ $config = [
'VuFind\Cookie\CookieManager' => 'VuFind\Cookie\CookieManagerFactory', 'VuFind\Cookie\CookieManager' => 'VuFind\Cookie\CookieManagerFactory',
'VuFind\Cover\Router' => 'VuFind\Cover\RouterFactory', 'VuFind\Cover\Router' => 'VuFind\Cover\RouterFactory',
'VuFind\Date\Converter' => 'VuFind\Service\ServiceWithConfigIniFactory', 'VuFind\Date\Converter' => 'VuFind\Service\ServiceWithConfigIniFactory',
'VuFind\Db\AdapterFactory' => 'VuFind\Service\Factory::getDbAdapterFactory', 'VuFind\Db\AdapterFactory' => 'VuFind\Service\ServiceWithConfigIniFactory',
'VuFind\Db\Row\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory', 'VuFind\Db\Row\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory',
'VuFind\Db\Table\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory', 'VuFind\Db\Table\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory',
'VuFind\Export' => 'VuFind\ExportFactory', 'VuFind\Export' => 'VuFind\ExportFactory',
......
...@@ -42,20 +42,6 @@ use Zend\ServiceManager\ServiceManager; ...@@ -42,20 +42,6 @@ use Zend\ServiceManager\ServiceManager;
*/ */
class Factory class Factory
{ {
/**
* Construct the date converter.
*
* @param ServiceManager $sm Service manager.
*
* @return \VuFind\Date\Converter
*/
public static function getDateConverter(ServiceManager $sm)
{
return new \VuFind\Date\Converter(
$sm->get('VuFind\Config\PluginManager')->get('config')
);
}
/** /**
* Construct the date converter. * Construct the date converter.
* *
...@@ -68,20 +54,6 @@ class Factory ...@@ -68,20 +54,6 @@ class Factory
return $sm->get('VuFind\Db\AdapterFactory')->getAdapter(); return $sm->get('VuFind\Db\AdapterFactory')->getAdapter();
} }
/**
* Construct the date converter.
*
* @param ServiceManager $sm Service manager.
*
* @return \VuFind\Db\AdapterFactory
*/
public static function getDbAdapterFactory(ServiceManager $sm)
{
return new \VuFind\Db\AdapterFactory(
$sm->get('VuFind\Config\PluginManager')->get('config')
);
}
/** /**
* Generic plugin manager factory (support method). * Generic plugin manager factory (support method).
* *
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment