/**
  * Create resources from service.
  *
  * If service has a route identifier, creates both entity and collection
  * resources; otherwise, creates an RPC resource.
  *
  * @return void
  */
 private function createResources()
 {
     // If there is routeIdentifierName, it is REST service and we need to
     // handle both collection and entities
     if ($this->service->getRouteIdentifierName()) {
         $this->resources[] = new Resource($this->service, $this->service->getOperations(), $this->getCollectionUri(), Resource::RESOURCE_TYPE_COLLECTION);
         $this->resources[] = new Resource($this->service, $this->service->getEntityOperations(), $this->getEntityUri(), Resource::RESOURCE_TYPE_ENTITY);
         return;
     }
     $this->resources[] = new Resource($this->service, $this->service->getOperations(), $this->getEntityUri(), Resource::RESOURCE_TYPE_RPC);
 }