cfmgrv4/app/Entities/Cloudflare/AccountEntity.php
2024-09-28 15:07:19 +09:00

32 lines
773 B
PHP

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