PHP Class ApiPlatform\Core\Metadata\Property\Factory\SerializerPropertyMetadataFactory

Author: Kévin Dunglas ([email protected])
Author: Teoh Han Hui ([email protected])
Inheritance: implements ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface
Datei anzeigen Open project: api-platform/core Class Usage Examples

Public Methods

Method Description
__construct ( ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface $serializerClassMetadataFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $decorated )
create ( string $resourceClass, string $property, array $options = [] ) : PropertyMetadata

Private Methods

Method Description
getEffectiveSerializerGroups ( array $options, string $resourceClass ) : array Gets the effective serializer groups used in normalization/denormalization.
getPropertySerializerGroups ( string $resourceClass, string $property ) : array Gets the serializer groups defined on a property.
getResourceSerializerGroups ( string $resourceClass ) : array Gets the serializer groups defined in a resource.
transformLinkStatus ( PropertyMetadata $propertyMetadata, array $normalizationGroups = null, array $denormalizationGroups = null ) : PropertyMetadata Sets readableLink/writableLink based on matching normalization/denormalization groups.
transformReadWrite ( PropertyMetadata $propertyMetadata, string $resourceClass, string $propertyName, array $normalizationGroups = null, array $denormalizationGroups = null ) : PropertyMetadata Sets readable/writable based on matching normalization/denormalization groups.

Method Details

__construct() public method

public __construct ( ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface $serializerClassMetadataFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $decorated )
$resourceMetadataFactory ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface
$serializerClassMetadataFactory Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface
$decorated ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface

create() public method

public create ( string $resourceClass, string $property, array $options = [] ) : PropertyMetadata
$resourceClass string
$property string
$options array
return ApiPlatform\Core\Metadata\Property\PropertyMetadata