当前位置: 首页>>代码示例>>PHP>>正文


PHP Registry::TransferRequest方法代码示例

本文整理汇总了PHP中Registry::TransferRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP Registry::TransferRequest方法的具体用法?PHP Registry::TransferRequest怎么用?PHP Registry::TransferRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Registry的用法示例。


在下文中一共展示了Registry::TransferRequest方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: OnDomainCreated


//.........这里部分代码省略.........
			//
				
			/*
			try
			{
				$this->Registry->RenewDomain($Domain, $extra=array('period' => 2));
				
				$this->TestCase->assertFalse(true, 'Domain renewal. Exception expected');
			}
			catch (Exception $e)
			{
				$this->TestCase->assertTrue($e->getMessage() == 'A domain can not be renewed earlier that 365 days from its expiration', 'Domain renewal');
			}
			*/
				
			
			// secondary registry
			$DataForm = new DataForm();
			$DataForm->AppendField( new DataFormField("ServerHost", FORM_FIELD_TYPE::TEXT, null, null, null, null, 'https://devepp.ics.forth.gr:700/epp/proxy'));
			$DataForm->AppendField( new DataFormField("Login", FORM_FIELD_TYPE::TEXT, null, null, null, null, 'digitalbox1'));
			$DataForm->AppendField( new DataFormField("Password", FORM_FIELD_TYPE::TEXT , null, null, null, null, 'agrigo'));
			$DataForm->AppendField( new DataFormField("ClientPrefix", FORM_FIELD_TYPE::TEXT, null, null, null, null, '371'));	
			$DataForm->AppendField( new DataFormField("UseSSLCert", FORM_FIELD_TYPE::CHECKBOX, null, null, null, null, '1'));	
			$DataForm->AppendField( new DataFormField("SSLpwd", FORM_FIELD_TYPE::TEXT, null, null, null, null, 'devepp'));	
			$DataForm->AppendField( new DataFormField("CLID", FORM_FIELD_TYPE::TEXT, null, null, null, null, 'digitalbox1'));
			$DataForm->AppendField( new DataFormField("SSLCertPath", FORM_FIELD_TYPE::TEXT, null, null, null, null, '/home/marat/webdev/epp-drs/branches/dev/app/modules/registries/EPPGR/ssl/cert.pem'));		
			
			
			$Module = new EPPGRRegistryModule();
			$Module->InitializeModule('gr', $DataForm);
			$Registry2 = new Registry($Module);		
			try
			{
				$ok = $Registry2->TransferRequest($Domain, array('pw' => $Domain->AuthCode));
				
				$this->TestCase->assertTrue($ok, 'Request domain transfer from another session');
			}
			catch (Exception $e)
			{
				$this->TestCase->fail('Request domain transfer from another session. Error: ' . $e->getMessage());
			}
			
			////
			// 17. Approve the Transfer using your OT&E1 account
			//
			
			try
			{
				$ok = $this->Registry->TransferApprove($Domain);
				
				$this->TestCase->assertTrue($ok, 'Approve transfer');
			}
			catch (Exception $e)
			{
				return $this->TestCase->fail('Approve transfer. Error: ' . $e->getMessage());
			}
			
			
			////
			// 19. Initiate the Transfer again using your OT&E1 account 
			//
			
			try
			{
				$ok = $this->Registry->TransferRequest($Domain, array('pw' => $Domain->AuthCode));
				
开发者ID:rchicoria,项目名称:epp-drs,代码行数:66,代码来源:tests.php

示例2:

 function _testDomainTransfer()
 {
 	$domain = DBDomain::GetInstance()->Load(99);
 	$res = $this->registry->TransferRequest($domain);
 	$this->assertTrue($res, "Transfer requested");
 }
开发者ID:rchicoria,项目名称:epp-drs,代码行数:6,代码来源:tests.php

示例3: array


//.........这里部分代码省略.........
     } catch (Exception $e) {
     }
     try {
         $this->Module->Request("domain-delete", array("name" => "newtesteppart.kz"));
     } catch (Exception $e) {
     }
     try {
         $Domain = $DbDomain->LoadByName('newtesteppart', 'kz');
         $this->Registry->DeleteDomain($Domain);
     } catch (Exception $e) {
     }
     //
     // 1. Create domain
     //
     $Contact = $this->Registry->NewContactInstance(CONTACT_TYPE::REGISTRANT);
     $Contact->SetFieldList($this->contact_fields);
     $this->Registry->CreateContact($Contact);
     $Domain = $this->Registry->NewDomainInstance();
     $Domain->UserID = 39;
     $Domain->Name = 'testeppart';
     $Domain->Period = 1;
     $Domain->SetContact($Contact, CONTACT_TYPE::REGISTRANT);
     $Domain->SetContact($Contact, CONTACT_TYPE::ADMIN);
     $Domain->SetContact($Contact, CONTACT_TYPE::TECH);
     $Domain->SetContact($Contact, CONTACT_TYPE::BILLING);
     $this->Registry->CreateDomain($Domain, $Domain->Period);
     $NS1 = new NameserverHost('ns1.testeppart.kz', '212.110.212.110');
     $this->Registry->CreateNameserver($NS1);
     $NS2 = new NameserverHost('ns2.testeppart.kz', '212.110.111.111');
     $this->Registry->CreateNameserver($NS2);
     $Changelist = $Domain->GetNameserverChangelist();
     $Changelist->Add($NS1);
     $Changelist->Add($NS2);
     $this->Registry->UpdateDomainNameservers($Domain, $Changelist);
     $this->AssertTrue(date('Ymd', $Domain->ExpireDate) == date('Ymd', strtotime('+1 year')) && count($Domain->GetNameserverList()) == 2, 'Create domain');
     // Reload domain from Db for correct operations
     $Domain = $DbDomain->LoadByName('testeppart', 'kz');
     $DbNameserverHost->LoadList($Domain->ID);
     //
     // 2. Update nameserver host
     //
     $nslist = $Domain->GetNameserverList();
     $NS2 = $nslist[1];
     $NS2->IPAddr = '212.111.110.110';
     $this->Registry->UpdateNameserverHost($NS2);
     $this->assertTrue(true, 'Update nameserver host');
     //
     // 3. Create nameserver host
     //
     $Domain4Host = $this->Registry->NewDomainInstance();
     $Domain->UserID = 39;
     $Domain->Name = 'newtesteppart';
     $Domain->Period = 1;
     $Domain->SetContact($Contact, CONTACT_TYPE::REGISTRANT);
     $this->Registry->CreateDomain($Domain, $Domain->Period);
     $NS3 = new NameserverHost('ns.newtesteppart.kz', '211.211.211.211');
     $this->Registry->CreateNameserverHost($NS3);
     $this->assertTrue(true, 'Create nameserver host');
     //
     // 4. Add nameserver to domain
     //
     $Changelist = $Domain->GetNameserverChangelist();
     $Changelist->Add($NS3);
     $this->Registry->UpdateDomainNameservers($Domain, $Changelist);
     $this->assertTrue(count($Domain->GetNameserverList()) == 3, 'Add nameserver to domain');
     //
     // 5. Remove nameserver from domain
     //
     $nslist = $Domain->GetNameserverList();
     $NS1 = $nslist[0];
     $Changelist = $Domain->GetNameserverChangelist();
     $Changelist->Remove($NS1);
     $this->Registry->UpdateDomainNameservers($Domain, $Changelist);
     $this->assertTrue(count($Domain->GetNameserverList()) == 2, 'Remove nameserver from domain');
     //
     // 6. Delete nameserver host
     //
     try {
         $this->Registry->DeleteNameserverHost($NS1);
         $this->assertTrue(true, 'Delete nameserver host');
     } catch (Exception $e) {
         $this->assertTrue(true, 'Delete nameserver host failed. Don\'t forget to cheat response code');
     }
     //
     // 7. Update contact
     //
     $contact_fields = $Contact->GetFieldList();
     $contact_fields['voice'] = '+380-555-7654321';
     $this->Registry->UpdateContact($Contact);
     $this->assertTrue(true, 'Update contact');
     //
     // 8. Start ingoing transfer
     //
     $TrnDomain = $this->Registry->NewDomainInstance();
     $TrnDomain->Name = 'xyz1';
     $TrnDomain->UserID = 39;
     $this->Registry->TransferRequest($TrnDomain, array('pw' => '123456'));
     $this->Registry->DeleteDomain($Domain);
     $this->Registry->DeleteContact($Contact);
 }
开发者ID:rchicoria,项目名称:epp-drs,代码行数:101,代码来源:tests.php

示例4: RunTest


//.........这里部分代码省略.........
     }
     $oplog[] = $op;
     ////
     // 13. Open Second Session using the OT&E2 account logon
     //
     $op = array('title' => "Open Second Session using the OT&E2 account logon");
     $op['ok'] = true;
     // It will be done automatical in next command
     ////
     // 14. Perform INFO command on the newly created domain from step 1 using the AUTH
     // INFO code populated in step 9 to get INFO results
     //
     $op = array('title' => "Perform INFO command on the newly created domain from step 1");
     try {
         $RDomain = $Registry2->NewDomainInstance();
         $RDomain->Name = $Domain->Name;
         $RDomain->AuthCode = $Domain->AuthCode;
         $RDomain = $Registry2->GetRemoteDomain($RDomain);
         $flags = $Domain->GetFlagList();
         $rflags = $RDomain->GetFlagList();
         sort($flags);
         sort($rflags);
         $op['ok'] = $RDomain->Name == $Domain->Name && date('Ymd', $RDomain->CreateDate) == date('Ymd', $Domain->CreateDate) && date('Ymd', $RDomain->ExpireDate) == date('Ymd', $Domain->ExpireDate) && $rflags == $flags;
     } catch (Exception $e) {
         $op['ok'] = false;
         $op['fail_reason'] = $e->getMessage();
     }
     $oplog[] = $op;
     ////
     // 15. Initiate Transfer domain command using your OT&E2 account
     //
     $op = array('title' => "Initiate Transfer domain command using your OT&E2 account");
     try {
         $ok = $Registry2->TransferRequest($Domain, array('pw' => $Domain->AuthCode));
         $op['ok'] = $ok;
     } catch (Exception $e) {
         $op['ok'] = false;
         $op['fail_reason'] = $e->getMessage();
     }
     $oplog[] = $op;
     ////
     // 16. Perform a Transfer Query command using your OT&E2 account
     //
     $op = array('title' => "Perform a Transfer Query command using your OT&E2 account");
     try {
         // Not implemented in cross-registry API
         $VerisignModule2 = $Registry2->GetModule();
         $params = array('name' => $Domain->GetHostName(), 'pw' => $Domain->AuthCode, 'subproduct' => 'dot' . strtoupper($Domain->Extension));
         $Resp = $VerisignModule2->Request('domain-trans-query', $params);
         $op['ok'] = $Resp->Succeed;
     } catch (Exception $e) {
         $op['ok'] = false;
         $op['fail_reason'] = $e->getMessage();
     }
     $oplog[] = $op;
     ////
     // 17. Approve the Transfer using your OT&E1 account
     //
     $op = array('title' => "Approve the Transfer using your OT&E1 account");
     try {
         $ok = $Registry->TransferApprove($Domain);
         $op['ok'] = $ok;
     } catch (Exception $e) {
         $op['ok'] = false;
         $op['fail_reason'] = $e->getMessage();
     }
开发者ID:rchicoria,项目名称:epp-drs,代码行数:67,代码来源:class.RegistryModule.php


注:本文中的Registry::TransferRequest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。