32 lines
880 B
PHP
32 lines
880 B
PHP
<?php
|
|
|
|
namespace App\Entities\Cloudflare;
|
|
|
|
use App\Models\Cloudflare\API\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(): int
|
|
{
|
|
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];
|
|
}
|
|
}
|