cfmgrv4/app/Entities/Cloudflare/ZoneEntity.php
2024-10-08 09:33:28 +09:00

32 lines
824 B
PHP

<?php
namespace App\Entities\Cloudflare;
use App\Models\Cloudflare\ZoneModel;
use App\Entities\CommonEntity;
class ZoneEntity extends CommonEntity
{
public function __toString()
{
return "{$this->getPK()}|{$this->getParent()}|{$this->getTitle()}|{$this->attributes['development_mode']}|{$this->attributes['ipv6']}|{$this->attributes['security_level']}";
}
public function getPK(): string
{
return $this->attributes[ZoneModel::PK];
}
public function getTitle(): string
{
return $this->attributes[ZoneModel::TITLE];
}
public function setTitle(string $title): void
{
$this->attributes[ZoneModel::TITLE] = $title;
}
//Common Function
public function getParent(): string
{
return $this->attributes[ZoneModel::PARENT];
}
}