Metaregistrar\EPP\eppDomain::setAuthorisationCode PHP Метод

setAuthorisationCode() публичный Метод

public setAuthorisationCode ( string $authorisationCode ) : void
$authorisationCode string
Результат void
    public function setAuthorisationCode($authorisationCode)
    {
        if ($authorisationCode) {
            $this->authorisationCode = htmlspecialchars($authorisationCode, ENT_COMPAT, "UTF-8");
        } else {
            $this->authorisationCode = $authorisationCode;
        }
    }

Usage Example

Пример #1
0
/**
 * @param $conn Metaregistrar\EPP\eppConnection
 * @param $domainname string
 * @return string
 */
function infodomain($conn, $domainname, $roid)
{
    try {
        $domain = new eppDomain($domainname);
        $domain->setAuthorisationCode(null);
        $info = new ptEppInfoDomainRequest($domain, $roid);
        if ($response = $conn->request($info)) {
            /* @var $response Metaregistrar\EPP\eppInfoDomainResponse */
            $d = $response->getDomain();
            echo "Info domain for " . $d->getDomainname() . ":\n";
            echo "Created on " . $response->getDomainCreateDate() . "\n";
            echo "Last update on " . $response->getDomainUpdateDate() . "\n";
            echo "Registrant " . $d->getRegistrant() . "\n";
            echo "Contact info:\n";
            foreach ($d->getContacts() as $contact) {
                /* @var $contact eppContactHandle */
                echo "  " . $contact->getContactType() . ": " . $contact->getContactHandle() . "\n";
            }
            echo "Nameserver info:\n";
            foreach ($d->getHosts() as $nameserver) {
                /* @var $nameserver eppHost */
                echo "  " . $nameserver->getHostname() . "\n";
            }
        } else {
            echo "ERROR2\n";
        }
    } catch (eppException $e) {
        return $e->getMessage();
    }
    return null;
}
All Usage Examples Of Metaregistrar\EPP\eppDomain::setAuthorisationCode