cfmgrv4/app/Entities/Cloudflare/AccountEntity.php
2024-09-24 17:29:05 +09:00

32 lines
779 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->getAPIKey()}|{$this->attributes['type']}|{$this->attributes['status']}";
}
public function getPK(): int
{
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 getAPIKey(): string
{
return $this->attributes['apikey'];
}
}