You are here

public function ObjectNormalizer::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Normalizer/ObjectNormalizer.php \Symfony\Component\Serializer\Normalizer\ObjectNormalizer::__construct()

Sets the {@link ClassMetadataFactoryInterface} to use.

Parameters

ClassMetadataFactoryInterface|null $classMetadataFactory:

NameConverterInterface|null $nameConverter:

Overrides AbstractNormalizer::__construct

File

vendor/symfony/serializer/Normalizer/ObjectNormalizer.php, line 34

Class

ObjectNormalizer
Converts between objects and arrays using the PropertyAccess component.

Namespace

Symfony\Component\Serializer\Normalizer

Code

public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null, PropertyAccessorInterface $propertyAccessor = null) {
  parent::__construct($classMetadataFactory, $nameConverter);
  $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
}