PHP 클래스 ApiPlatform\Core\Serializer\AbstractItemNormalizer

저자: Kévin Dunglas ([email protected])
상속: extends Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer, use trait ContextTrait
파일 보기 프로젝트 열기: api-platform/core 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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, PropertyMetadata $propertyMetadata, Symfony\Component\PropertyInfo\Type $type, string $className, mixed $value, string $format = null, array $context ) : array Denormalizes a collection of objects.
denormalizeRelation ( string $attributeName, PropertyMetadata $propertyMetadata, string $className, mixed $value, string $format = null, array $context ) : object | null Denormalizes a relation.
normalizeRelation ( PropertyMetadata $propertyMetadata, mixed $relatedObject, string $resourceClass, string $format = null, array $context ) : string | array 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.

메소드 상세

__construct() 공개 메소드

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

createRelationSerializationContext() 보호된 메소드

Creates the context to use when serializing a relation.
protected createRelationSerializationContext ( string $resourceClass, array $context ) : array
$resourceClass string
$context array
리턴 array

denormalize() 공개 메소드

public denormalize ( $data, $class, $format = null, array $context = [] )
$context array

extractAttributes() 보호된 메소드

Unused in this context.
protected extractAttributes ( $object, $format = null, array $context = [] )
$context array

getAllowedAttributes() 보호된 메소드

protected getAllowedAttributes ( $classOrObject, array $context, $attributesAsString = false )
$context array

getAttributeValue() 보호된 메소드

protected getAttributeValue ( $object, $attribute, $format = null, array $context = [] )
$context array

getFactoryOptions() 보호된 메소드

Gets a valid context for property metadata factories.
또한 보기: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php
protected getFactoryOptions ( array $context ) : array
$context array
리턴 array

normalize() 공개 메소드

public normalize ( $object, $format = null, array $context = [] )
$context array

setAttributeValue() 보호된 메소드

protected setAttributeValue ( $object, $attribute, $value, $format = null, array $context = [] )
$context array

supportsDenormalization() 공개 메소드

public supportsDenormalization ( $data, $type, $format = null )

supportsNormalization() 공개 메소드

public supportsNormalization ( $data, $format = null )

validateType() 보호된 메소드

Validates the type of the value. Allows using integers as floats for JSON formats.
protected validateType ( string $attribute, Symfony\Component\PropertyInfo\Type $type, mixed $value, string $format = null )
$attribute string
$type Symfony\Component\PropertyInfo\Type
$value mixed
$format string

프로퍼티 상세

$iriConverter 보호되어 있는 프로퍼티

protected $iriConverter

$propertyAccessor 보호되어 있는 프로퍼티

protected $propertyAccessor

$propertyMetadataFactory 보호되어 있는 프로퍼티

protected $propertyMetadataFactory

$propertyNameCollectionFactory 보호되어 있는 프로퍼티

protected $propertyNameCollectionFactory

$resourceClassResolver 보호되어 있는 프로퍼티

protected $resourceClassResolver