36 lines
874 B
PHP
36 lines
874 B
PHP
<?php
|
|
|
|
namespace App\Entities\Cloudflare;
|
|
|
|
use App\Models\Cloudflare\FirewallModel;
|
|
use App\Entities\CommonEntity;
|
|
|
|
class FirewallEntity extends CommonEntity
|
|
{
|
|
public function __toString()
|
|
{
|
|
return "{$this->getPK()}|{$this->getParent()}|{$this->getTitle()}{$this->attributes['enabled']}";
|
|
}
|
|
public function getPK(): string
|
|
{
|
|
return $this->attributes[FirewallModel::PK];
|
|
}
|
|
public function getTitle(): string
|
|
{
|
|
return $this->attributes[FirewallModel::TITLE];
|
|
}
|
|
public function setTitle(string $title): void
|
|
{
|
|
$this->attributes[FirewallModel::TITLE] = $title;
|
|
}
|
|
//Common Function
|
|
public function getParent(): string
|
|
{
|
|
return $this->attributes[FirewallModel::PARENT];
|
|
}
|
|
public function getRulesetID(): string
|
|
{
|
|
return $this->attributes['rulesetid'];
|
|
}
|
|
}
|