PHP 클래스 WoohooLabs\Yin\JsonApi\Transformer\AbstractResourceTransformer

상속: implements WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface, use trait WoohooLabs\Yin\TransformerTrait
파일 보기 프로젝트 열기: woohoolabs/yin

공개 메소드들

메소드 설명
transformRelationship ( string $relationshipName, Transformation $transformation, mixed $domainObject, array $additionalMeta = [] ) : array | null Transforms a relationship with a name of $relationshipName of the original resource to a JSON API relationship.
transformToResource ( Transformation $transformation, mixed $domainObject ) : array Transforms the original resource to a JSON API resource.
transformToResourceIdentifier ( mixed $domainObject ) : array | null Transforms the original resource to a JSON API resource identifier.

보호된 메소드들

메소드 설명
transformAttributes ( Transformation $transformation, array $attributes, mixed $domainObject ) : array
transformAttributesObject ( array &$array, Transformation $transformation, mixed $domainObject )
transformLinksObject ( array &$array, mixed $domainObject )
transformRelationshipObject ( Transformation $transformation, mixed $domainObject, string $relationshipName, array $relationships, array $defaultRelationships, array $additionalMeta = [] ) : array | null
transformRelationships ( Transformation $transformation, mixed $domainObject, array $relationships ) : array
transformRelationshipsObject ( array &$array, Transformation $transformation, mixed $domainObject )
validateRelationships ( Transformation $transformation, array $relationships )

메소드 상세

transformAttributes() 보호된 메소드

protected transformAttributes ( Transformation $transformation, array $attributes, mixed $domainObject ) : array
$transformation Transformation
$attributes array
$domainObject mixed
리턴 array

transformAttributesObject() 보호된 메소드

protected transformAttributesObject ( array &$array, Transformation $transformation, mixed $domainObject )
$array array
$transformation Transformation
$domainObject mixed

transformLinksObject() 보호된 메소드

protected transformLinksObject ( array &$array, mixed $domainObject )
$array array
$domainObject mixed

transformRelationship() 공개 메소드

Transforms a relationship with a name of $relationshipName of the original resource to a JSON API relationship.
public transformRelationship ( string $relationshipName, Transformation $transformation, mixed $domainObject, array $additionalMeta = [] ) : array | null
$relationshipName string
$transformation Transformation
$domainObject mixed
$additionalMeta array
리턴 array | null

transformRelationshipObject() 보호된 메소드

protected transformRelationshipObject ( Transformation $transformation, mixed $domainObject, string $relationshipName, array $relationships, array $defaultRelationships, array $additionalMeta = [] ) : array | null
$transformation Transformation
$domainObject mixed
$relationshipName string
$relationships array
$defaultRelationships array
$additionalMeta array
리턴 array | null

transformRelationships() 보호된 메소드

protected transformRelationships ( Transformation $transformation, mixed $domainObject, array $relationships ) : array
$transformation Transformation
$domainObject mixed
$relationships array
리턴 array

transformRelationshipsObject() 보호된 메소드

protected transformRelationshipsObject ( array &$array, Transformation $transformation, mixed $domainObject )
$array array
$transformation Transformation
$domainObject mixed

transformToResource() 공개 메소드

Transforms the original resource to a JSON API resource.
public transformToResource ( Transformation $transformation, mixed $domainObject ) : array
$transformation Transformation
$domainObject mixed
리턴 array

transformToResourceIdentifier() 공개 메소드

Transforms the original resource to a JSON API resource identifier.
public transformToResourceIdentifier ( mixed $domainObject ) : array | null
$domainObject mixed
리턴 array | null

validateRelationships() 보호된 메소드

protected validateRelationships ( Transformation $transformation, array $relationships )
$transformation Transformation
$relationships array