cfmgrv4/app/Entities/Cloudflare/AccountEntity.php
2024-09-25 19:45:42 +09:00

36 lines
873 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->getAuthKey()}|{$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 getID(): string
{
return $this->attributes['id'];
}
public function getAuthKey(): string
{
return $this->attributes['authkey'];
}
}