예제 #1
0
 /**
  * Query for a resource set pointed by the given segment descriptor and update the descriptor with the result.
  *
  * @param SegmentDescriptor $segment Describes the resource set to query
  * @return void
  *
  */
 private function handleSegmentTargetsToResourceSet(SegmentDescriptor $segment)
 {
     if ($segment->isSingleResult()) {
         $entityInstance = $this->providers->getResourceFromResourceSet($segment->getTargetResourceSetWrapper(), $segment->getKeyDescriptor());
         $segment->setResult($entityInstance);
     } else {
         $queryResult = $this->providers->getResourceSet($this->request->queryType, $segment->getTargetResourceSetWrapper(), $this->request->getFilterInfo(), $this->request->getInternalOrderByInfo(), $this->request->getTopCount(), $this->request->getSkipCount());
         $segment->setResult($queryResult);
     }
 }