Changeset View
Changeset View
Standalone View
Standalone View
src/app/Domain.php
Show First 20 Lines • Show All 303 Lines • ▼ Show 20 Lines | public function hash($mod = null): string | ||||
} | } | ||||
$hash = \md5('hkccp-verify-' . $this->namespace); | $hash = \md5('hkccp-verify-' . $this->namespace); | ||||
return $mod === self::HASH_TEXT ? "$cname=$hash" : $hash; | return $mod === self::HASH_TEXT ? "$cname=$hash" : $hash; | ||||
} | } | ||||
/** | /** | ||||
* String representation of this user. | |||||
* | |||||
* @return string | |||||
*/ | |||||
public function toString() | |||||
{ | |||||
return $this->namespace; | |||||
} | |||||
/** | |||||
* Verify if a domain exists in DNS | * Verify if a domain exists in DNS | ||||
* | * | ||||
* @return bool True if registered, False otherwise | * @return bool True if registered, False otherwise | ||||
* @throws \Exception Throws exception on DNS or DB errors | * @throws \Exception Throws exception on DNS or DB errors | ||||
*/ | */ | ||||
public function verify(): bool | public function verify(): bool | ||||
{ | { | ||||
if ($this->isVerified()) { | if ($this->isVerified()) { | ||||
Show All 29 Lines |