Domain registrars

Create zone

createZone()

Gets executed by hostware before the transfer / registration gets executed. After that, hostware waits 5 minutes to execute the trans/reg operation so the zone can be reached globally.

This function is optional If not implemented, hostware will expect that the zone will be created during transfer / registration.

Parameters

You get both the TLD and SLD of the requested domain. If the customer searches for "hostware.io", you get the following input:

Type

Name

Description

Domain

$domain

The Domain model

Array

$nameservers

Array of nameservers

Response

Optionally a mixed response which will be interpreted and saved as the zone id.

Example Code

public function createZone(Domain $domain, array $nameservers) {

		$xml = <<<XML
<?xml version="1.0" encoding="utf-8" ?>
<request>
	{$this->getXmlHeader()}
    <transaction>
		<group>dns</group>
		<action>create</action>
		<attribute>managed</attribute>
		<object>{$domain->punycode_fqdn}</object>
		<values>
			{$this->_getZoneXml($domain)}
		</values>
	</transaction>
</request>
XML;

		$this->getClient()->callRaw($xml, $this->config['sandbox']);
	}
Was this helpful?