Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface::isPathIncluded PHP Méthode

isPathIncluded() public méthode

If path is included.
public isPathIncluded ( string $path, string $type ) : boolean
$path string
$type string
Résultat boolean
    public function isPathIncluded($path, $type);

Usage Example

 /**
  * @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;
 }
All Usage Examples Of Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface::isPathIncluded