Metaregistrar\EPP\eppUpdateContactRequest::__construct PHP Method

__construct() public method

public __construct ( $objectname, $addinfo = null, $removeinfo = null, $updateinfo = null, $namespacesinroot = true )
    function __construct($objectname, $addinfo = null, $removeinfo = null, $updateinfo = null, $namespacesinroot = true)
    {
        $this->setNamespacesinroot($namespacesinroot);
        parent::__construct(eppRequest::TYPE_UPDATE);
        if ($objectname instanceof eppContactHandle) {
            $contacthandle = $objectname->getContactHandle();
        } else {
            if (strlen($objectname)) {
                $contacthandle = $objectname;
            } else {
                throw new eppException("Object name must be valid string on eppUpdateContactRequest");
            }
        }
        if ($addinfo instanceof eppContact || $removeinfo instanceof eppContact || $updateinfo instanceof eppContact) {
            $this->updateContact($contacthandle, $addinfo, $removeinfo, $updateinfo);
        } else {
            throw new eppException('addinfo, removeinfo and updateinfo needs to be eppContact object on eppUpdateContactRequest');
        }
        $this->addSessionId();
    }