cfmgrv4 init...4

This commit is contained in:
최준흠 2024-11-18 11:49:14 +09:00
parent 1702158376
commit e35a278b72

View File

@ -162,11 +162,13 @@ class ZoneService extends CloudflareService
public function expire(ZoneEntity $entity): void
{
$whois = Factory::get()->createWhois();
if ($whois->isDomainAvailable($entity->getTitle())) {
$info = $whois->loadDomainInfo($entity->getTitle());
if ($info) {
$expire_date = date("Y-m-d", $info->expirationDate);
$this->getModel()->modify($entity, ['expire_date' => $expire_date]);
log_message('debug', __FUNCTION__ . " : {$entity->getTitle()} => {$expire_date}");
} else {
log_message('debug', "{$entity->getTitle()} 이 도메인은 등록되지 않았습니다.");
}
}