47 lines
917 B
PHP
47 lines
917 B
PHP
<?php
|
|
|
|
namespace App\Entities\Mangboard;
|
|
|
|
use App\Entities\CommonEntity;
|
|
|
|
class BoardEntity extends CommonEntity
|
|
{
|
|
public function __toString(): string
|
|
{
|
|
return "{$this->getPK()}:{$this->getTitle()}";
|
|
}
|
|
public function getPK(): int
|
|
{
|
|
return $this->attributes['pid'];
|
|
}
|
|
public function getTitle(): string
|
|
{
|
|
return $this->attributes['title'];
|
|
}
|
|
//Common Function
|
|
|
|
public function setTitle(string $value)
|
|
{
|
|
$this->attributes['title'] = $value;
|
|
}
|
|
|
|
public function getGID(): int
|
|
{
|
|
return $this->attributes['gid'];
|
|
}
|
|
public function setGID(int $value)
|
|
{
|
|
$this->attributes['gid'] = $value;
|
|
}
|
|
|
|
|
|
public function setText(string $value)
|
|
{
|
|
$this->attributes['text'] = $value;
|
|
}
|
|
public function setContent(string $value)
|
|
{
|
|
$this->attributes['content'] = $value;
|
|
}
|
|
}
|