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

Fixed incorrect setShareByDefault() behavior.

parent 34e47cea
No related merge requests found
...@@ -46,12 +46,12 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager ...@@ -46,12 +46,12 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
public function __construct( public function __construct(
\Zend\ServiceManager\ConfigInterface $configuration = null \Zend\ServiceManager\ConfigInterface $configuration = null
) { ) {
parent::__construct($configuration);
// These plugins are not meant to be shared -- the same module may be used // These plugins are not meant to be shared -- the same module may be used
// multiple times with different configurations, so we need to build a new // multiple times with different configurations, so we need to build a new
// copy each time the plugin is retrieved. // copy each time the plugin is retrieved.
$this->setShareByDefault(false); $this->setShareByDefault(false);
parent::__construct($configuration);
} }
/** /**
......
...@@ -46,6 +46,10 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager ...@@ -46,6 +46,10 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
public function __construct( public function __construct(
\Zend\ServiceManager\ConfigInterface $configuration = null \Zend\ServiceManager\ConfigInterface $configuration = null
) { ) {
// Record drivers are not meant to be shared -- every time we retrieve one,
// we are building a brand new object.
$this->setShareByDefault(false);
parent::__construct($configuration); parent::__construct($configuration);
// Add an initializer for setting up hierarchies // Add an initializer for setting up hierarchies
...@@ -63,10 +67,6 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager ...@@ -63,10 +67,6 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
} }
}; };
$this->addInitializer($initializer, false); $this->addInitializer($initializer, false);
// Record drivers are not meant to be shared -- every time we retrieve one,
// we are building a brand new object.
$this->setShareByDefault(false);
} }
/** /**
......
...@@ -46,12 +46,12 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager ...@@ -46,12 +46,12 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
public function __construct( public function __construct(
\Zend\ServiceManager\ConfigInterface $configuration = null \Zend\ServiceManager\ConfigInterface $configuration = null
) { ) {
parent::__construct($configuration);
// These plugins are not meant to be shared -- the same module may be used // These plugins are not meant to be shared -- the same module may be used
// multiple times with different configurations, so we need to build a new // multiple times with different configurations, so we need to build a new
// copy each time the plugin is retrieved. // copy each time the plugin is retrieved.
$this->setShareByDefault(false); $this->setShareByDefault(false);
parent::__construct($configuration);
} }
/** /**
......
...@@ -46,11 +46,11 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager ...@@ -46,11 +46,11 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
public function __construct( public function __construct(
\Zend\ServiceManager\ConfigInterface $configuration = null \Zend\ServiceManager\ConfigInterface $configuration = null
) { ) {
parent::__construct($configuration);
// Stats drivers are not meant to be shared -- every time we retrieve one, // Stats drivers are not meant to be shared -- every time we retrieve one,
// we are building a brand new object. // we are building a brand new object.
$this->setShareByDefault(false); $this->setShareByDefault(false);
parent::__construct($configuration);
} }
/** /**
......
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