PHP Class WellCommerce\Bundle\ApiBundle\Serializer\AbstractSerializer

Author: Adam Piotrowski ([email protected])
Inheritance: implements Symfony\Component\Serializer\SerializerAwareInterface
Mostrar archivo Open project: wellcommerce/wellcommerce

Protected Properties

Property Type Description
$context array
$doctrineHelper WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface
$format string
$propertyAccessor Symfony\Component\PropertyAccess\PropertyAccessor
$serializationMetadataCollection WellCommerce\Bundle\ApiBundle\Metadata\Collection\SerializationMetadataCollection
$serializationMetadataLoader WellCommerce\Bundle\ApiBundle\Metadata\Loader\SerializationMetadataLoaderInterface
$serializer Symfony\Component\Serializer\SerializerInterface | Symfony\Component\Serializer\Normalizer\NormalizerInterface | Symfony\Component\Serializer\Normalizer\DenormalizerInterface

Public Methods

Method Description
__construct ( WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface $doctrineHelper, WellCommerce\Bundle\ApiBundle\Metadata\Loader\SerializationMetadataLoaderInterface $serializationMetadataLoader ) AbstractSerializer constructor.
setSerializer ( Symfony\Component\Serializer\SerializerInterface $serializer )

Protected Methods

Method Description
buildPath ( $propertyName ) : Symfony\Component\PropertyAccess\PropertyPath
getEntityAssociations ( Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata ) : array Returns the entity fields
getEntityEmbeddables ( Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata ) : array Returns the entity embeddable fields
getEntityFields ( Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata ) : array Returns the entity fields
getEntityMetadata ( object $entity ) : Doctrine\Common\Persistence\Mapping\ClassMetadata Returns the metadata for entity
getPropertyPath ( $attributeName ) : Symfony\Component\PropertyAccess\PropertyPath Builds property path in array-notation style from given attribute's name
getSerializationMetadata ( object $entity ) : WellCommerce\Bundle\ApiBundle\Metadata\SerializationClassMetadataInterface Returns the serialization metadata for given entity
getSerializationMetadataCollection ( ) : WellCommerce\Bundle\ApiBundle\Metadata\Collection\SerializationMetadataCollection

Private Methods

Method Description
getRealClass ( object $object ) : string Returns the real class name

Method Details

__construct() public method

AbstractSerializer constructor.
public __construct ( WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface $doctrineHelper, WellCommerce\Bundle\ApiBundle\Metadata\Loader\SerializationMetadataLoaderInterface $serializationMetadataLoader )
$doctrineHelper WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface
$serializationMetadataLoader WellCommerce\Bundle\ApiBundle\Metadata\Loader\SerializationMetadataLoaderInterface

buildPath() protected method

protected buildPath ( $propertyName ) : Symfony\Component\PropertyAccess\PropertyPath
$propertyName
return Symfony\Component\PropertyAccess\PropertyPath

getEntityAssociations() protected method

Returns the entity fields
protected getEntityAssociations ( Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata ) : array
$metadata Doctrine\Common\Persistence\Mapping\ClassMetadata
return array

getEntityEmbeddables() protected method

Returns the entity embeddable fields
protected getEntityEmbeddables ( Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata ) : array
$metadata Doctrine\Common\Persistence\Mapping\ClassMetadata
return array

getEntityFields() protected method

Returns the entity fields
protected getEntityFields ( Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata ) : array
$metadata Doctrine\Common\Persistence\Mapping\ClassMetadata
return array

getEntityMetadata() protected method

Returns the metadata for entity
protected getEntityMetadata ( object $entity ) : Doctrine\Common\Persistence\Mapping\ClassMetadata
$entity object
return Doctrine\Common\Persistence\Mapping\ClassMetadata

getPropertyPath() protected method

Builds property path in array-notation style from given attribute's name
protected getPropertyPath ( $attributeName ) : Symfony\Component\PropertyAccess\PropertyPath
$attributeName
return Symfony\Component\PropertyAccess\PropertyPath

getSerializationMetadata() protected method

Returns the serialization metadata for given entity
protected getSerializationMetadata ( object $entity ) : WellCommerce\Bundle\ApiBundle\Metadata\SerializationClassMetadataInterface
$entity object
return WellCommerce\Bundle\ApiBundle\Metadata\SerializationClassMetadataInterface

getSerializationMetadataCollection() protected method

protected getSerializationMetadataCollection ( ) : WellCommerce\Bundle\ApiBundle\Metadata\Collection\SerializationMetadataCollection
return WellCommerce\Bundle\ApiBundle\Metadata\Collection\SerializationMetadataCollection

setSerializer() public method

public setSerializer ( Symfony\Component\Serializer\SerializerInterface $serializer )
$serializer Symfony\Component\Serializer\SerializerInterface

Property Details

$context protected_oe property

protected array $context
return array

$doctrineHelper protected_oe property

protected DoctrineHelperInterface,WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine $doctrineHelper
return WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface

$format protected_oe property

protected string $format
return string

$propertyAccessor protected_oe property

protected PropertyAccessor,Symfony\Component\PropertyAccess $propertyAccessor
return Symfony\Component\PropertyAccess\PropertyAccessor

$serializationMetadataCollection protected_oe property

protected SerializationMetadataCollection,WellCommerce\Bundle\ApiBundle\Metadata\Collection $serializationMetadataCollection
return WellCommerce\Bundle\ApiBundle\Metadata\Collection\SerializationMetadataCollection

$serializationMetadataLoader protected_oe property

protected SerializationMetadataLoaderInterface,WellCommerce\Bundle\ApiBundle\Metadata\Loader $serializationMetadataLoader
return WellCommerce\Bundle\ApiBundle\Metadata\Loader\SerializationMetadataLoaderInterface

$serializer protected_oe property

protected SerializerInterface,Symfony\Component\Serializer|NormalizerInterface,Symfony\Component\Serializer\Normalizer|DenormalizerInterface,Symfony\Component\Serializer\Normalizer $serializer
return Symfony\Component\Serializer\SerializerInterface | Symfony\Component\Serializer\Normalizer\NormalizerInterface | Symfony\Component\Serializer\Normalizer\DenormalizerInterface