public function getProjectionQueryServiceByType(ProjectionTypeInterface $projection_type)
 {
     $query_service_key = $projection_type->getVariantPrefix() . '::query_service';
     return $this->getQueryService($query_service_key);
 }
Beispiel #2
0
 public function getByProjectionType(ProjectionTypeInterface $projection_type)
 {
     $query_service_key = sprintf('%s::query_service', $projection_type->getVariantPrefix());
     return $this->getItem($query_service_key);
 }
 protected function getDataAccessComponent(ProjectionTypeInterface $projection_type, $component = 'reader')
 {
     $default_component_name = sprintf('%s::view_store::%s', $projection_type->getVariantPrefix(), $component);
     $custom_component_option = $projection_type->getPrefix() . '.' . $component;
     switch ($component) {
         case 'finder':
             return $this->data_access_service->getFinder($this->config->get($custom_component_option, $default_component_name));
             break;
         case 'reader':
             return $this->data_access_service->getStorageReader($this->config->get($custom_component_option, $default_component_name));
             break;
         case 'writer':
             return $this->data_access_service->getStorageWriter($this->config->get($custom_component_option, $default_component_name));
             break;
     }
     throw new RuntimeError('Invalid data access component name given: ' . $component);
 }