PHP Class WoohooLabs\Yin\JsonApi\Schema\Relationship\AbstractRelationship

Inheritance: use trait WoohooLabs\Yin\JsonApi\Schema\LinksTrait, use trait WoohooLabs\Yin\JsonApi\Schema\MetaTrait
Datei anzeigen Open project: woohoolabs/yin Class Usage Examples

Protected Properties

Property Type Description
$isCallableData boolean
$omitDataWhenNotIncluded boolean
$resourceTransformer WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface

Public Methods

Method Description
__construct ( array $meta = [], WoohooLabs\Yin\JsonApi\Schema\Links $links = null, mixed $data = null, WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface $resourceTransformer = null )
omitWhenNotIncluded ( )
setData ( mixed $data, WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface $resourceTransformer )
setDataAsCallable ( callable $data, WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface $resourceTransformer )
transform ( Transformation $transformation, string $resourceType, string $relationshipName, array $defaultRelationships, array $additionalMeta = [] ) : array | null

Protected Methods

Method Description
retrieveData ( ) : mixed
transformData ( Transformation $transformation, string $relationshipName, array $defaultRelationships ) : array | null
transformResource ( Transformation $transformation, mixed $domainObject, string $relationshipName, array $defaultRelationships ) : array

Method Details

__construct() public method

public __construct ( array $meta = [], WoohooLabs\Yin\JsonApi\Schema\Links $links = null, mixed $data = null, WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface $resourceTransformer = null )
$meta array
$links WoohooLabs\Yin\JsonApi\Schema\Links
$data mixed
$resourceTransformer WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface

omitWhenNotIncluded() public method

public omitWhenNotIncluded ( )

retrieveData() protected method

protected retrieveData ( ) : mixed
return mixed

setData() public method

public setData ( mixed $data, WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface $resourceTransformer )
$data mixed
$resourceTransformer WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface

setDataAsCallable() public method

public setDataAsCallable ( callable $data, WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface $resourceTransformer )
$data callable
$resourceTransformer WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface

transform() public method

public transform ( Transformation $transformation, string $resourceType, string $relationshipName, array $defaultRelationships, array $additionalMeta = [] ) : array | null
$transformation WoohooLabs\Yin\JsonApi\Transformer\Transformation
$resourceType string
$relationshipName string
$defaultRelationships array
$additionalMeta array
return array | null

transformData() abstract protected method

abstract protected transformData ( Transformation $transformation, string $relationshipName, array $defaultRelationships ) : array | null
$transformation WoohooLabs\Yin\JsonApi\Transformer\Transformation
$relationshipName string
$defaultRelationships array
return array | null

transformResource() protected method

protected transformResource ( Transformation $transformation, mixed $domainObject, string $relationshipName, array $defaultRelationships ) : array
$transformation WoohooLabs\Yin\JsonApi\Transformer\Transformation
$domainObject mixed
$relationshipName string
$defaultRelationships array
return array

Property Details

$isCallableData protected_oe property

protected bool $isCallableData
return boolean

$omitDataWhenNotIncluded protected_oe property

protected bool $omitDataWhenNotIncluded
return boolean

$resourceTransformer protected_oe property

protected ResourceTransformerInterface,WoohooLabs\Yin\JsonApi\Transformer $resourceTransformer
return WoohooLabs\Yin\JsonApi\Transformer\ResourceTransformerInterface