コード例 #1
0
ファイル: class.Registry.php プロジェクト: rchicoria/epp-drs
 function DispatchPollUpdateDomain(PollUpdateDomainResponse $resp)
 {
     if ($resp->IsFailed()) {
         Log::Log(sprintf('DispatchPollUpdateDomain failed. Registry response: %s', $resp->ErrMsg), E_USER_ERROR);
         throw new Exception($resp->ErrMsg, $resp->Code);
     }
     if ($resp->Succeed()) {
         list($name, $extension) = FQDN::Parse($resp->HostName);
         $domain = $this->DBDomain->LoadByName($name, $extension, $this->GetManifest());
         if ($resp->Result) {
             $domain = $this->GetRemoteDomain($domain);
             $this->FireEvent('DomainOperation', $domain, self::OP_UPDATE);
             $this->FireEvent('DomainUpdated', $domain);
             $this->DBDomain->Save($domain);
         } else {
             $this->FireEvent('DomainOperation', $domain, self::OP_UPDATE, true, $resp->FailReason);
         }
         return true;
     }
 }