PHP Класс Neomerx\JsonApi\Encoder\Parameters\ParametersAnalyzer

Наследование: implements Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface $parameters, Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container ) Constructor.
getIncludeRelationships ( $path, $type )
getParameters ( )
hasSomeFields ( $type )
isPathIncluded ( $path, $type )

Защищенные методы

Метод Описание
hasExactPathMatch ( array $paths, string $path ) : boolean If path has exact match with one of the 'include' paths.
hasMatchWithIncludedPaths ( array $paths, string $path ) : boolean If path matches one of the included paths.

Приватные методы

Метод Описание
getIncludePathsByType ( string $type ) : string[]
getRelationshipNameForResource ( string $curPath, integer $pathLength ) : string
getRelationshipNameForTopResource ( string $curPath ) : string

Описание методов

__construct() публичный метод

Constructor.
public __construct ( Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface $parameters, Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container )
$parameters Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface
$container Neomerx\JsonApi\Contracts\Schema\ContainerInterface

getIncludeRelationships() публичный метод

public getIncludeRelationships ( $path, $type )

getParameters() публичный метод

public getParameters ( )

hasExactPathMatch() защищенный метод

If path has exact match with one of the 'include' paths.
protected hasExactPathMatch ( array $paths, string $path ) : boolean
$paths array
$path string
Результат boolean

hasMatchWithIncludedPaths() защищенный метод

If path matches one of the included paths.
protected hasMatchWithIncludedPaths ( array $paths, string $path ) : boolean
$paths array
$path string
Результат boolean

hasSomeFields() публичный метод

public hasSomeFields ( $type )

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

public isPathIncluded ( $path, $type )