Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagephp
title/module/my_module/my_module.php
linenumberstrue
<?php
use Blesta\Core\Util\Modules\Registrar;

class Namesilo extends Module implements Registrar
{
	...
	
    public function checkTransferAvailability($domaingetDomainContacts($domain, $module_row_id = null)
    {
		#
		# TODO: Get the contacts of the domain
		#
    }

    public function setDomainContacts($domain, array $vars = [], $module_row_id = null)
    {
		#
		# TODO: Set the contacts of the domain
		#
    }

    public function checkTransferAvailability($domain, $module_row_id = null)
    {
		// Check if the domain can be transferred
		#        return !$this->checkAvailability($domain, $module_row_id);
    }

	public function checkAvailability($domain, $module_row_id = null)
    {
		#
		# TODO: Check if the domain is available
		#
	}

	public function getExpirationDate($domain, $format = 'Y-m-d H:i:s', $module_row_id = null)
    {
		#
		# TODO: Get the expiration date of the domain
		#
	}

    public function getDomainInfo($domain, $module_row_id = null)
    {
		#
		# TODO: Get the domain information
		#
    }

    public function getDomainIsLocked($domain, $module_row_id = null)
    {
		#
		# TODO: Check if the domain is locked
		#
    }

    public function getDomainNameservers($domain, $module_row_id = null)
    {
		#
		# TODO: Get the domain name server 
		#
    }

    public function setDomainNameservers($domain, $module_row_id = null, array $vars = [])
    {
		#
		# TODO: Set the domain name server 
		#
    }

    public function setNameserverIps(array $vars = [], $module_row_id = null)
    {
		#
		# TODO: Set the domain name server IP addresses
		#
    }

    public function lockDomain($domain, $module_row_id = null)
    {
		#
		# TODO: Lock the domain from being transferred
		#
    }

    public function unlockDomain($domain, $module_row_id = null)
    {
		#
		# TODO: Unlock the domain to allow transfers
		#
    }

    public function registerDomain($domain, $module_row_id = null, array $vars = [])
    {
		#
		# TODO: Register a new domain with the registrar
		#
    }

    public function transferDomain($domain, $module_row_id = null, array $vars = [])
    {
		#
		# TODO: Transfer a domain to another registrar
		#
    }

    public function resendTransferEmail($domain, $module_row_id = null)
    {
		#
		# TODO: Re-send the transfer confirmation email
		#
    }

    public function sendEppEmail($domain, $module_row_id = null)
    {
		#
		# TODO: Send an email with the EPP code
		#
    }

    public function updateEppCode($domain, $epp_code, $module_row_id = null, array $vars = [])
    {
		#
		# TODO: Update the EPP code
		#
    }

    public function renewDomain($domain, $module_row_id = null, array $vars = [])
    {
		#
		# TODO: Renew the domain for the given amount of years
		#
    }

    public function restoreDomain($domain, $module_row_id = null, array $vars = [])
    {
		#
		# TODO: Restore a suspended domain
		#
    }

    public function getTldPricing($module_row_id = null)
    {
		// Returns an array containing the pricing for each tld
        return [
            '.com' => [
                'USD' => [
                    1 => ['register' => 10, 'transfer' => 10, 'renew' => 10],
                    2 => ['register' => 20, 'transfer' => 20, 'renew' => 20]
                ]
            ]
        ];
    }

	public function getTlds($module_row_id = null)
    {
		// Returns a list of the TLDs supported by the module
		return [
			'.com',
			'.net',
			'.org'
		];
	}
	...
}

...