Guides
Tutorials
Converts item and resources to IRI and vice versa.
class ApiPlatform\Symfony\Routing\IriConverter implements `<a href="/docs/reference/Api/IriConverterInterface">ApiPlatform\Api\IriConverterInterface</a>`
{
public __construct(ApiPlatform\State\ProviderInterface $provider, Symfony\Component\Routing\RouterInterface $router, ApiPlatform\Api\IdentifiersExtractorInterface $identifiersExtractor, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, null|ApiPlatform\Api\UriVariablesConverterInterface $uriVariablesConverter, null|ApiPlatform\Api\IriConverterInterface $decorated, null|ApiPlatform\Metadata\Operation\Factory\OperationMetadataFactoryInterface $operationMetadataFactory)
public getResourceFromIri(string $iri, array $context, null|ApiPlatform\Metadata\Operation $operation): object
public getIriFromResource(object|string $resource, int $referenceType, null|ApiPlatform\Metadata\Operation $operation, array $context): string
}
class ApiPlatform\Symfony\Routing\IriConverter implements `<a href="/docs/reference/Api/IriConverterInterface">ApiPlatform\Api\IriConverterInterface</a>`
{
public __construct(ApiPlatform\State\ProviderInterface $provider, Symfony\Component\Routing\RouterInterface $router, ApiPlatform\Api\IdentifiersExtractorInterface $identifiersExtractor, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, null|ApiPlatform\Api\UriVariablesConverterInterface $uriVariablesConverter, null|ApiPlatform\Api\IriConverterInterface $decorated, null|ApiPlatform\Metadata\Operation\Factory\OperationMetadataFactoryInterface $operationMetadataFactory)
public getResourceFromIri(string $iri, array $context, null|ApiPlatform\Metadata\Operation $operation): object
public getIriFromResource(object|string $resource, int $referenceType, null|ApiPlatform\Metadata\Operation $operation, array $context): string
}
public __construct(ApiPlatform\State\ProviderInterface $provider, Symfony\Component\Routing\RouterInterface $router, ApiPlatform\Api\IdentifiersExtractorInterface $identifiersExtractor, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, null|ApiPlatform\Api\UriVariablesConverterInterface $uriVariablesConverter, null|ApiPlatform\Api\IriConverterInterface $decorated, null|ApiPlatform\Metadata\Operation\Factory\OperationMetadataFactoryInterface $operationMetadataFactory)
public __construct(ApiPlatform\State\ProviderInterface $provider, Symfony\Component\Routing\RouterInterface $router, ApiPlatform\Api\IdentifiersExtractorInterface $identifiersExtractor, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, null|ApiPlatform\Api\UriVariablesConverterInterface $uriVariablesConverter, null|ApiPlatform\Api\IriConverterInterface $decorated, null|ApiPlatform\Metadata\Operation\Factory\OperationMetadataFactoryInterface $operationMetadataFactory)
provider | ApiPlatform\State\ProviderInterface | |
router | Symfony\Component\Routing\RouterInterface | |
identifiersExtractor | ApiPlatform\Api\IdentifiersExtractorInterface | |
resourceClassResolver | ApiPlatform\Api\ResourceClassResolverInterface | |
resourceMetadataCollectionFactory | ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface | |
uriVariablesConverter | ApiPlatform\Api\UriVariablesConverterInterface | |
decorated | ApiPlatform\Api\IriConverterInterface | |
operationMetadataFactory | ApiPlatform\Metadata\Operation\Factory\OperationMetadataFactoryInterface |
Retrieves an item from its IRI.
public getResourceFromIri(string $iri, array $context, null|ApiPlatform\Metadata\Operation $operation): object
public getResourceFromIri(string $iri, array $context, null|ApiPlatform\Metadata\Operation $operation): object
iri | string | |
context | array | |
operation | ApiPlatform\Metadata\Operation |
object
Gets the IRI associated with the given item.
public getIriFromResource(object|string $resource, int $referenceType, null|ApiPlatform\Metadata\Operation $operation, array $context): string
public getIriFromResource(object|string $resource, int $referenceType, null|ApiPlatform\Metadata\Operation $operation, array $context): string
resource | object string | |
referenceType | int | |
operation | ApiPlatform\Metadata\Operation | |
context | array |
string