cfmgrv4/app/Entities/SNSUserEntity.php
2024-10-08 15:11:33 +09:00

33 lines
696 B
PHP

<?php
namespace App\Entities;
use App\Entities\CommonEntity;
use App\Models\SNSUserModel;
class SNSUserEntity extends CommonEntity
{
public function __toString(): string
{
return "{$this->getPK()}|{$this->getID()}|{$this->getTitle()}";
}
public function getTitle(): string
{
return $this->attributes[SNSUserModel::TITLE];
}
public function setTitle(string $title): void
{
$this->attributes[SNSUserModel::TITLE] = $title;
}
//Common Function
public function getPK(): int
{
return $this->attributes[SNSUserModel::PK];
}
public function getID(): string
{
return $this->attributes['id'];
}
}