public function addUsername($username) { if (!strlen($username)) { throw new eppException('No userid specified for login attempt'); } $this->login->appendChild($this->createElement('clID', $username)); }