public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array())
 {
     if (isset($data['domains'])) {
         foreach ($data['domains'] as $value) {
             $domain = $denormalizer->denormalize($value, __NAMESPACE__ . '\\' . 'Domain');
             $this->addDomain($domain);
         }
         unset($data['domains']);
     }
     return parent::denormalize($denormalizer, $data, $format);
 }
 public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array())
 {
     if (isset($data['mailboxes'])) {
         foreach ($data['mailboxes'] as $value) {
             $mailbox = $denormalizer->denormalize($value, __NAMESPACE__ . '\\' . 'Mailbox');
             $this->addMailbox($mailbox);
         }
         unset($data['mailboxes']);
     }
     return parent::denormalize($denormalizer, $data, $format);
 }