/**
  * Inject the input filters collection, if any, as an embedded collection
  *
  * @param RestServiceEntity $service
  */
 protected function injectInputFilters(RestServiceEntity $service)
 {
     $inputFilters = $this->inputFilterModel->fetch($this->moduleName, $service->controllerServiceName);
     if (!$inputFilters instanceof InputFilterCollection || !count($inputFilters)) {
         return;
     }
     $collection = [];
     $parentName = str_replace('\\', '-', $service->controllerServiceName);
     foreach ($inputFilters as $inputFilter) {
         $inputFilter['input_filter_name'] = str_replace('\\', '-', $inputFilter['input_filter_name']);
         $entity = new HalEntity($inputFilter, $inputFilter['input_filter_name']);
         $links = $entity->getLinks();
         $links->add(Link::factory(['rel' => 'self', 'route' => ['name' => 'zf-apigility/api/module/rest-service/input-filter', 'params' => ['name' => $this->moduleName, 'controller_service_name' => $parentName, 'input_filter_name' => $inputFilter['input_filter_name']]]]));
         $collection[] = $entity;
     }
     $collection = new HalCollection($collection);
     $collection->setCollectionName('input_filter');
     $collection->setCollectionRoute('zf-apigility/module/rest-service/input-filter');
     $collection->setCollectionRouteParams(['name' => $service->module, 'controller_service_name' => $service->controllerServiceName]);
     $service->exchangeArray(['input_filters' => $collection]);
 }
 /**
  * Inject the input filters collection, if any, as an embedded collection
  *
  * @param DoctrineRpcServiceEntity $service
  */
 protected function injectInputFilters(DoctrineRpcServiceEntity $service)
 {
     $inputFilters = $this->inputFilterModel->fetch($this->moduleName, $service->controllerServiceName);
     if (!$inputFilters instanceof InputFilterCollection || !count($inputFilters)) {
         return;
     }
     // @codeCoverageIgnoreStart
     $collection = array();
     foreach ($inputFilters as $inputFilter) {
         $resource = new HalResource($inputFilter, $inputFilter['input_filter_name']);
         $links = $resource->getLinks();
         $links->add(Link::factory(array('rel' => 'self', 'route' => array('name' => 'zf-apigility-admin/api/module/rpc-service/rpc_input_filter', 'params' => array('name' => $this->moduleName, 'controller_service_name' => $service->controllerServiceName, 'input_filter_name' => $inputFilter['input_filter_name'])))));
         $collection[] = $resource;
     }
     $collection = new HalCollection($collection);
     $collection->setCollectionName('input_filter');
     $collection->setCollectionRoute('zf-apigility-admin/module/rpc-service/inputfilter');
     $collection->setCollectionRouteParams(array('name' => $this->moduleName, 'controller_service_name' => $service->controllerServiceName));
     $service->exchangeArray(array('input_filters' => $collection));
 }