Автор: Kévin Dunglas (dunglas@gmail.com)
Наследование: extends AbstractNormalizer
Пример #1
0
 public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null, PropertyAccessorInterface $propertyAccessor = null)
 {
     parent::__construct($classMetadataFactory, $nameConverter);
     $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function supportsDenormalization($data, $type, $format = null)
 {
     return parent::supportsDenormalization($data, $type, $format) && $this->supports($type);
 }
 public function instantiateObject(array &$data, $class, array &$context, \ReflectionClass $reflectionClass, $allowedAttributes, $format = null)
 {
     return parent::instantiateObject($data, $class, $context, $reflectionClass, $allowedAttributes, $format);
 }
Пример #4
0
 /**
  * {@inheritdoc}
  */
 public function denormalize($data, $class, $format = null, array $context = [])
 {
     $context['api_denormalize'] = true;
     if (!isset($context['resource_class'])) {
         $context['resource_class'] = $class;
     }
     return parent::denormalize($data, $class, $format, $context);
 }