PHP Класс Neomerx\JsonApi\Schema\SchemaProvider

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

Защищенные свойства (Protected)

Свойство Тип Описание
$isShowAttributesInIncluded boolean
$resourceType string
$selfSubUrl Must start with '/' e.g. '/sub-url'

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

Метод Описание
__construct ( Neomerx\JsonApi\Contracts\Schema\SchemaFactoryInterface $factory )
createResourceObject ( $resource, $isOriginallyArrayed, $attributeKeysFilter = null )
getIncludePaths ( )
getIncludedResourceLinks ( $resource )
getInclusionMeta ( $resource )
getLinkageMeta ( $resource )
getPrimaryMeta ( $resource )
getRelationshipObjectIterator ( $resource, $isPrimary, array $includeRelationships )
getRelationshipRelatedLink ( $resource, $name, $meta = null, $treatAsHref = false )
getRelationshipSelfLink ( $resource, $name, $meta = null, $treatAsHref = false )
getRelationships ( object $resource, boolean $isPrimary, array $includeRelationships ) : array Get resource links.
getRelationshipsInclusionMeta ( $resource )
getRelationshipsPrimaryMeta ( $resource )
getResourceLinks ( $resource )
getResourceType ( )
getSelfSubLink ( $resource )
getSelfSubUrl ( $resource = null )
isShowAttributesInIncluded ( )

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

Метод Описание
createLink ( string $subHref, null | mixed $meta = null, boolean $treatAsHref = false ) : Neomerx\JsonApi\Contracts\Document\LinkInterface
createRelationshipObject ( object $resource, string $name, array $desc ) : Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface
getRelationshipRelatedUrl ( object $resource, string $name ) : string
getRelationshipSelfUrl ( object $resource, string $name ) : string
readLinks ( object $resource, string $relationshipName, array $description, boolean $isShowSelf, boolean $isShowRelated ) : array

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

Метод Описание
getValue ( array $array, string $key, mixed $default = null ) : mixed

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

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

public __construct ( Neomerx\JsonApi\Contracts\Schema\SchemaFactoryInterface $factory )
$factory Neomerx\JsonApi\Contracts\Schema\SchemaFactoryInterface

createRelationshipObject() защищенный Метод

protected createRelationshipObject ( object $resource, string $name, array $desc ) : Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface
$resource object
$name string
$desc array
Результат Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface

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

public createResourceObject ( $resource, $isOriginallyArrayed, $attributeKeysFilter = null )

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

public getIncludePaths ( )

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

public getInclusionMeta ( $resource )

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

public getLinkageMeta ( $resource )

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

public getPrimaryMeta ( $resource )

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

public getRelationshipObjectIterator ( $resource, $isPrimary, array $includeRelationships )
$includeRelationships array

getRelationshipRelatedUrl() защищенный Метод

protected getRelationshipRelatedUrl ( object $resource, string $name ) : string
$resource object
$name string
Результат string

getRelationshipSelfUrl() защищенный Метод

protected getRelationshipSelfUrl ( object $resource, string $name ) : string
$resource object
$name string
Результат string

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

Get resource links.
public getRelationships ( object $resource, boolean $isPrimary, array $includeRelationships ) : array
$resource object
$isPrimary boolean
$includeRelationships array A list of relationships that will be included as full resources.
Результат array

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

public getRelationshipsInclusionMeta ( $resource )

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

public getRelationshipsPrimaryMeta ( $resource )

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

public getResourceType ( )

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

public getSelfSubUrl ( $resource = null )

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

Описание свойств

$isShowAttributesInIncluded защищенное свойство

protected bool $isShowAttributesInIncluded
Результат boolean

$resourceType защищенное свойство

protected string $resourceType
Результат string

$selfSubUrl защищенное свойство

Must start with '/' e.g. '/sub-url'
protected $selfSubUrl