<?php

namespace App\Entities\Cloudflare;

use App\Models\Cloudflare\ZoneModel;
use App\Entities\CommonEntity;

class ZoneEntity extends CommonEntity
{
    public function __toString()
    {
        return "{$this->getPK()}|{$this->getParent()}|{$this->getTitle()}|{$this->attributes['development_mode']}|{$this->attributes['ipv6']}|{$this->attributes['security_level']}";
    }
    public function getPK(): string
    {
        return $this->attributes[ZoneModel::PK];
    }
    public function getTitle(): string
    {
        return $this->attributes[ZoneModel::TITLE];
    }
    public function setTitle(string $title): void
    {
        $this->attributes[ZoneModel::TITLE] = $title;
    }
    //Common Function
    public function getParent(): string
    {
        return $this->attributes[ZoneModel::PARENT];
    }
}
