PHP Interface ApiPlatform\Core\Api\IriConverterInterface

Author: Kévin Dunglas ([email protected])
Show file Open project: api-platform/core Interface Usage Examples

Public Methods

Method Description
getIriFromItem ( object $item, integer $referenceType = UrlGeneratorInterface::ABS_PATH ) : string Gets the IRI associated with the given item.
getIriFromResourceClass ( string $resourceClass, integer $referenceType = UrlGeneratorInterface::ABS_PATH ) : string Gets the IRI associated with the given resource collection.
getItemFromIri ( string $iri, array $context = [] ) : object Retrieves an item from its IRI.

Method Details

getIriFromItem() public method

Gets the IRI associated with the given item.
public getIriFromItem ( object $item, integer $referenceType = UrlGeneratorInterface::ABS_PATH ) : string
$item object
$referenceType integer
return string

getIriFromResourceClass() public method

Gets the IRI associated with the given resource collection.
public getIriFromResourceClass ( string $resourceClass, integer $referenceType = UrlGeneratorInterface::ABS_PATH ) : string
$resourceClass string
$referenceType integer
return string

getItemFromIri() public method

Retrieves an item from its IRI.
public getItemFromIri ( string $iri, array $context = [] ) : object
$iri string
$context array
return object