denormalizer->denormalize($value, 'DigiComp\\HetznerDnsApi\\Model\\ZoneResponse', 'json', $context); } $object->setZones($values); } elseif (\array_key_exists('zones', $data) && $data['zones'] === null) { $object->setZones(null); } if (\array_key_exists('meta', $data) && $data['meta'] !== null) { $object->setMeta($this->denormalizer->denormalize($data['meta'], 'DigiComp\\HetznerDnsApi\\Model\\Meta', 'json', $context)); } elseif (\array_key_exists('meta', $data) && $data['meta'] === null) { $object->setMeta(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->getZones()) { $values = array(); foreach ($object->getZones() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } $data['zones'] = $values; } if (null !== $object->getMeta()) { $data['meta'] = $this->normalizer->normalize($object->getMeta(), 'json', $context); } return $data; } }