Metaregistrar\EPP\iisEppCreateContactRequest::__construct PHP Method

__construct() public method

public __construct ( $createinfo, $orgno = null, $vatno = null )
    function __construct($createinfo, $orgno = null, $vatno = null)
    {
        parent::__construct($createinfo);
        $contactname = $createinfo->getPostalInfo(0)->getOrganisationName();
        if (!$contactname || strlen($contactname) == 0) {
            $contactname = $createinfo->getPostalInfo(0)->getName();
        }
        $this->contactobject->getElementsByTagName('contact:id')->item(0)->nodeValue = $this->createContactId($contactname);
        $this->addExtension('xmlns:iis', 'urn:se:iis:xml:epp:iis-1.2');
        if ($orgno) {
            $this->addIISOrganization($orgno);
        }
        if ($vatno) {
            $this->addIISVat($vatno);
        }
        $this->addSessionId();
    }