PHP Class WoohooLabs\Yin\JsonApi\Hydrator\Relationship\ToOneRelationship

ファイルを表示 Open project: woohoolabs/yin Class Usage Examples

Protected Properties

Property Type Description
$resourceIdentifier WoohooLabs\Yin\JsonApi\Schema\ResourceIdentifier | null

Public Methods

Method Description
__construct ( ResourceIdentifier $resourceIdentifier = null )
getResourceIdentifier ( ) : ResourceIdentifier | null
isEmpty ( ) : boolean Returns true if this relationship is empty, not containing a resource identifier.
setResourceIdentifier ( ResourceIdentifier $resourceIdentifier )

Method Details

__construct() public method

public __construct ( ResourceIdentifier $resourceIdentifier = null )
$resourceIdentifier WoohooLabs\Yin\JsonApi\Schema\ResourceIdentifier

getResourceIdentifier() public method

public getResourceIdentifier ( ) : ResourceIdentifier | null
return WoohooLabs\Yin\JsonApi\Schema\ResourceIdentifier | null $resourceIdentifier

isEmpty() public method

This will be the case when the request wants to clear a relationship and sends null as data.
public isEmpty ( ) : boolean
return boolean

setResourceIdentifier() public method

public setResourceIdentifier ( ResourceIdentifier $resourceIdentifier )
$resourceIdentifier WoohooLabs\Yin\JsonApi\Schema\ResourceIdentifier

Property Details

$resourceIdentifier protected_oe property

protected ResourceIdentifier,WoohooLabs\Yin\JsonApi\Schema|null $resourceIdentifier
return WoohooLabs\Yin\JsonApi\Schema\ResourceIdentifier | null