Свойство | Тип | Описание | |
---|---|---|---|
$iriConverter | |||
$propertyAccessor | |||
$propertyMetadataFactory | |||
$propertyNameCollectionFactory | |||
$resourceClassResolver |
Метод | Описание | |
---|---|---|
__construct ( ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Core\Api\IriConverterInterface $iriConverter, ApiPlatform\Core\Api\ResourceClassResolverInterface $resourceClassResolver, Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor = null, Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter = null ) | ||
denormalize ( $data, $class, $format = null, array $context = [] ) | ||
normalize ( $object, $format = null, array $context = [] ) | ||
supportsDenormalization ( $data, $type, $format = null ) | ||
supportsNormalization ( $data, $format = null ) |
Метод | Описание | |
---|---|---|
createRelationSerializationContext ( string $resourceClass, array $context ) : array | Creates the context to use when serializing a relation. | |
extractAttributes ( $object, $format = null, array $context = [] ) | ||
getAllowedAttributes ( $classOrObject, array $context, $attributesAsString = false ) | ||
getAttributeValue ( $object, $attribute, $format = null, array $context = [] ) | ||
getFactoryOptions ( array $context ) : array | Gets a valid context for property metadata factories. | |
setAttributeValue ( $object, $attribute, $value, $format = null, array $context = [] ) | ||
validateType ( string $attribute, Symfony\Component\PropertyInfo\Type $type, mixed $value, string $format = null ) | Validates the type of the value. Allows using integers as floats for JSON formats. |
Метод | Описание | |
---|---|---|
denormalizeCollection ( string $attribute, |
Denormalizes a collection of objects. | |
denormalizeRelation ( string $attributeName, |
Denormalizes a relation. | |
normalizeRelation ( |
Normalizes a relation as an URI if is a Link or as a JSON-LD object. | |
setValue ( object $object, string $attributeName, mixed $value ) | Sets a value of the object using the PropertyAccess component. |
public __construct ( ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Core\Api\IriConverterInterface $iriConverter, ApiPlatform\Core\Api\ResourceClassResolverInterface $resourceClassResolver, Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor = null, Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter = null ) | ||
$propertyNameCollectionFactory | ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface | |
$propertyMetadataFactory | ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface | |
$iriConverter | ApiPlatform\Core\Api\IriConverterInterface | |
$resourceClassResolver | ApiPlatform\Core\Api\ResourceClassResolverInterface | |
$propertyAccessor | Symfony\Component\PropertyAccess\PropertyAccessorInterface | |
$nameConverter | Symfony\Component\Serializer\NameConverter\NameConverterInterface |
public denormalize ( $data, $class, $format = null, array $context = [] ) | ||
$context | array |
protected extractAttributes ( $object, $format = null, array $context = [] ) | ||
$context | array |
protected getAllowedAttributes ( $classOrObject, array $context, $attributesAsString = false ) | ||
$context | array |
protected getAttributeValue ( $object, $attribute, $format = null, array $context = [] ) | ||
$context | array |
protected getFactoryOptions ( array $context ) : array | ||
$context | array | |
Результат | array |
protected setAttributeValue ( $object, $attribute, $value, $format = null, array $context = [] ) | ||
$context | array |
public supportsDenormalization ( $data, $type, $format = null ) |