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

Changed statistics driver plugin manager to return non-shared instances;...

Changed statistics driver plugin manager to return non-shared instances; eliminated explicit cloning.
parent c63c3f16
No related merge requests found
......@@ -140,7 +140,7 @@ abstract class AbstractBase implements ServiceLocatorAwareInterface
// If we got this far, we want the current option! Build the driver:
$loader = $this->getServiceLocator()
->get('StatisticsDriverPluginManager');
$newDriver = clone($loader->get($setting[0]));
$newDriver = $loader->get($setting[0]);
// Set the name of the data source; we use the special value
// "global" to represent global writer requests (the special null
......
......@@ -38,6 +38,21 @@ namespace VuFind\Statistics\Driver;
*/
class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
{
/**
* Constructor
*
* @param null|ConfigInterface $configuration Configuration settings (optional)
*/
public function __construct(
\Zend\ServiceManager\ConfigInterface $configuration = null
) {
parent::__construct($configuration);
// Stats drivers are not meant to be shared -- every time we retrieve one,
// we are building a brand new object.
$this->setShareByDefault(false);
}
/**
* Return the name of the base class or interface that plug-ins must conform
* to.
......
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