isPathIncluded() публичный Метод

If path is included.
public isPathIncluded ( string $path, string $type ) : boolean
$path string
$type string
Результат boolean
Пример #1
0
 /**
  * @inheritdoc
  */
 public function isShouldParseRelationships(StackReadOnlyInterface $stack)
 {
     if ($stack->count() < 2) {
         // top level, no resources ware started to parse yet
         $shouldContinue = true;
     } else {
         // on the way to included paths
         $currentPath = $stack->end()->getPath();
         $currentRootType = $stack->root()->getResource()->getType();
         $shouldContinue = $this->parameterAnalyzer->isPathIncluded($currentPath, $currentRootType);
     }
     return $shouldContinue;
 }
Пример #2
0
 /**
  * @param string     $rootType
  * @param Frame      $current
  * @param Frame|null $previous
  *
  * @return bool[]
  */
 private function getIfTargets($rootType, Frame $current, Frame $previous = null)
 {
     $currentIsTarget = $this->parameterAnalyzer->isPathIncluded($current->getPath(), $rootType);
     $parentIsTarget = $previous === null || $this->parameterAnalyzer->isPathIncluded($previous->getPath(), $rootType);
     return [$parentIsTarget, $currentIsTarget];
 }