container = $container; $this->options = $options; } /** * {@inheritdoc} */ public function get($collection) { if (!isset($this->stores[$collection])) { if (isset($this->options[$collection])) { $service_id = $this->options[$collection]; } elseif (isset($this->options[static::DEFAULT_SETTING])) { $service_id = $this->options[static::DEFAULT_SETTING]; } else { $service_id = static::DEFAULT_SERVICE; } $this->stores[$collection] = $this->container->get($service_id)->get($collection); } return $this->stores[$collection]; } }