Reference
C
Class

ApiPlatform\Api\IdentifiersExtractor

Extracts identifiers for a given Resource according to the retrieved Metadata.

class ApiPlatform\Api\IdentifiersExtractor implements `<a href="/docs/reference/Api/IdentifiersExtractorInterface">ApiPlatform\Api\IdentifiersExtractorInterface</a>`
{
    public __construct(ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, null|Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor)
    public getIdentifiersFromItem(object $item, null|ApiPlatform\Metadata\Operation $operation, array $context): array
}
class ApiPlatform\Api\IdentifiersExtractor implements `<a href="/docs/reference/Api/IdentifiersExtractorInterface">ApiPlatform\Api\IdentifiersExtractorInterface</a>`
{
    public __construct(ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, null|Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor)
    public getIdentifiersFromItem(object $item, null|ApiPlatform\Metadata\Operation $operation, array $context): array
}

Methods

__construct

public __construct(ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, null|Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor)
public __construct(ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, null|Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor)

Parameters

resourceMetadataFactoryApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface
resourceClassResolverApiPlatform\Api\ResourceClassResolverInterface
propertyNameCollectionFactoryApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface
propertyMetadataFactoryApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface
propertyAccessorSymfony\Component\PropertyAccess\PropertyAccessorInterface

getIdentifiersFromItem

Finds identifiers from an Item (object).TODO: 3.0 identifiers should be stringable?

public getIdentifiersFromItem(object $item, null|ApiPlatform\Metadata\Operation $operation, array $context): array
public getIdentifiersFromItem(object $item, null|ApiPlatform\Metadata\Operation $operation, array $context): array

Parameters

itemobject
operationApiPlatform\Metadata\Operation
contextarray

Returns

array

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop