public function setEmail($email) { if ($email) { $this->contactobject->appendChild($this->createElement('contact:email', $email)); } }