setZoneId($data['zone_id']); } elseif (\array_key_exists('zone_id', $data) && $data['zone_id'] === null) { $object->setZoneId(null); } if (\array_key_exists('address', $data) && $data['address'] !== null) { $object->setAddress($data['address']); } elseif (\array_key_exists('address', $data) && $data['address'] === null) { $object->setAddress(null); } if (\array_key_exists('port', $data) && $data['port'] !== null) { $object->setPort($data['port']); } elseif (\array_key_exists('port', $data) && $data['port'] === null) { $object->setPort(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->getZoneId()) { $data['zone_id'] = $object->getZoneId(); } if (null !== $object->getAddress()) { $data['address'] = $object->getAddress(); } if (null !== $object->getPort()) { $data['port'] = $object->getPort(); } return $data; } }