denormalizer->denormalize($value, 'DigiComp\\HetznerDnsApi\\Model\\PrimaryServerResponse', 'json', $context); } $object->setPrimaryServers($values); } elseif (\array_key_exists('primary_servers', $data) && $data['primary_servers'] === null) { $object->setPrimaryServers(null); } return $object; } /** * @return array|string|int|float|bool|\ArrayObject|null */ public function normalize($object, $format = null, array $context = array()) { $data = array(); if (null !== $object->getPrimaryServers()) { $values = array(); foreach ($object->getPrimaryServers() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } $data['primary_servers'] = $values; } return $data; } }