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

Show file Open project: woohoolabs/yin Class Usage Examples

Protected Properties

Property Type Description
$resourceIdentifiers WoohooLabs\Yin\JsonApi\Schema\ResourceIdentifier[]

Public Methods

Method Description
__construct ( array $resourceIdentifiers = [] )
addResourceIdentifier ( ResourceIdentifier $resourceIdentifier )
getResourceIdentifierIds ( ) : array
getResourceIdentifierTypes ( ) : array
getResourceIdentifiers ( ) : ResourceIdentifier[]
isEmpty ( ) : boolean Returns true if this relationship is empty, not containing a resource identifier This will be the case when the request want to clear a relationship and sends an empty array as data.

Method Details

__construct() public method

public __construct ( array $resourceIdentifiers = [] )
$resourceIdentifiers array

addResourceIdentifier() public method

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

getResourceIdentifierIds() public method

public getResourceIdentifierIds ( ) : array
return array

getResourceIdentifierTypes() public method

public getResourceIdentifierTypes ( ) : array
return array

getResourceIdentifiers() public method

public getResourceIdentifiers ( ) : ResourceIdentifier[]
return WoohooLabs\Yin\JsonApi\Schema\ResourceIdentifier[]

isEmpty() public method

Returns true if this relationship is empty, not containing a resource identifier This will be the case when the request want to clear a relationship and sends an empty array as data.
public isEmpty ( ) : boolean
return boolean

Property Details

$resourceIdentifiers protected property

protected ResourceIdentifier[],WoohooLabs\Yin\JsonApi\Schema $resourceIdentifiers
return WoohooLabs\Yin\JsonApi\Schema\ResourceIdentifier[]