コード例 #1
0
 /**
  * @inheritdoc
  */
 public function isRelationshipInFieldSet(StackReadOnlyInterface $stack)
 {
     $resourceType = $stack->penult()->getResource()->getType();
     $resourceFieldSet = $this->getFieldSet($resourceType);
     $inFieldSet = $resourceFieldSet === null ? true : array_key_exists($stack->end()->getRelationship()->getName(), $resourceFieldSet);
     return $inFieldSet;
 }
コード例 #2
0
 /**
  * @param StackReadOnlyInterface $stack
  *
  * @return bool[]
  */
 private function foundInPaths(StackReadOnlyInterface $stack)
 {
     if ($stack->count() < 2) {
         // top level, no resources ware started to parse yet
         $onTheWay = true;
         $parentIsTarget = false;
     } else {
         $onTheWay = $this->parameters->hasMatchWithIncludedPaths($stack->end()->getPath());
         $parentIsTarget = $this->parameters->isPathIncluded($stack->penult()->getPath());
     }
     return [$onTheWay, $parentIsTarget];
 }