PHP 클래스 Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer

저자: Kévin Dunglas ([email protected])
상속: extends AbstractNormalizer
파일 보기 프로젝트 열기: symfony/symfony 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface $classMetadataFactory = null, Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter = null, Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface $propertyTypeExtractor = null )
denormalize ( $data, $class, $format = null, array $context = [] )
normalize ( $object, $format = null, array $context = [] )
supportsDenormalization ( $data, $type, $format = null )
supportsNormalization ( $data, $format = null )

보호된 메소드들

메소드 설명
extractAttributes ( object $object, string | null $format = null, array $context = [] ) : string[] Extracts attributes to normalize from the class of the given object, format and context.
getAttributeValue ( object $object, string $attribute, string | null $format = null, array $context = [] ) : mixed Gets the attribute value.
getAttributes ( object $object, string | null $format = null, array $context ) : string[] Gets and caches attributes for the given object, format and context.
setAttributeValue ( object $object, string $attribute, mixed $value, string | null $format = null, array $context = [] ) Sets attribute value.

비공개 메소드들

메소드 설명
getCacheKey ( string | null $format, array $context ) : boolean | string Gets the cache key to use.
isMaxDepthReached ( array $attributesMetadata, string $class, string $attribute, array &$context ) : boolean Is the max depth reached for the given attribute?
updateData ( array $data, string $attribute, mixed $attributeValue ) : array Sets an attribute and apply the name converter if necessary.
validateAndDenormalize ( string $currentClass, string $attribute, mixed $data, string | null $format, array $context ) : mixed Validates the submitted data and denormalizes it.

메소드 상세

__construct() 공개 메소드

public __construct ( Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface $classMetadataFactory = null, Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter = null, Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface $propertyTypeExtractor = null )
$classMetadataFactory Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface
$nameConverter Symfony\Component\Serializer\NameConverter\NameConverterInterface
$propertyTypeExtractor Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface

denormalize() 공개 메소드

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

extractAttributes() 추상적인 보호된 메소드

Extracts attributes to normalize from the class of the given object, format and context.
abstract protected extractAttributes ( object $object, string | null $format = null, array $context = [] ) : string[]
$object object
$format string | null
$context array
리턴 string[]

getAttributeValue() 추상적인 보호된 메소드

Gets the attribute value.
abstract protected getAttributeValue ( object $object, string $attribute, string | null $format = null, array $context = [] ) : mixed
$object object
$attribute string
$format string | null
$context array
리턴 mixed

getAttributes() 보호된 메소드

Gets and caches attributes for the given object, format and context.
protected getAttributes ( object $object, string | null $format = null, array $context ) : string[]
$object object
$format string | null
$context array
리턴 string[]

normalize() 공개 메소드

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

setAttributeValue() 추상적인 보호된 메소드

Sets attribute value.
abstract protected setAttributeValue ( object $object, string $attribute, mixed $value, string | null $format = null, array $context = [] )
$object object
$attribute string
$value mixed
$format string | null
$context array

supportsDenormalization() 공개 메소드

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

supportsNormalization() 공개 메소드

public supportsNormalization ( $data, $format = null )