cfmgrv4/app/Entities/Cloudflare/RecordEntity.php
2024-10-08 15:11:33 +09:00

32 lines
879 B
PHP

<?php
namespace App\Entities\Cloudflare;
use App\Models\Cloudflare\RecordModel;
use App\Entities\CommonEntity;
class RecordEntity extends CommonEntity
{
public function __toString()
{
return "{$this->getPK()}|{$this->getParent()}|{$this->getTitle()}|{$this->attributes['host']}|{$this->attributes['content']}|{$this->attributes['proxied']}|{$this->attributes['fixed']}|{$this->attributes['locked']}";
}
public function getPK(): string
{
return $this->attributes[RecordModel::PK];
}
public function getTitle(): string
{
return $this->attributes[RecordModel::TITLE];
}
public function setTitle(string $title): void
{
$this->attributes[RecordModel::TITLE] = $title;
}
//Common Function
public function getParent(): string
{
return $this->attributes[RecordModel::PARENT];
}
}