31 lines
698 B
PHP
31 lines
698 B
PHP
<?php
|
|
|
|
namespace App\Entities\Cloudflare;
|
|
|
|
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['uid'];
|
|
}
|
|
public function getTitle(): string
|
|
{
|
|
return $this->attributes['id'];
|
|
}
|
|
public function setTitle(string $title): void
|
|
{
|
|
$this->attributes['id'] = $title;
|
|
}
|
|
//Common Function
|
|
public function getAPIKey(): string
|
|
{
|
|
return $this->attributes['apikey'];
|
|
}
|
|
}
|