31 lines
753 B
PHP
31 lines
753 B
PHP
<?php
|
|
|
|
namespace App\Libraries\Mangboard;
|
|
|
|
use App\Entities\Mangboard\FreeboardEntity;
|
|
use App\Models\Mangboard\FreeboardModel;
|
|
|
|
class FreeboardLibrary extends MangboardLibrary
|
|
{
|
|
|
|
private $_model = null;
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
private function getModel(): FreeboardModel
|
|
{
|
|
if ($this->_model === null) {
|
|
$this->_model = new FreeboardModel();
|
|
}
|
|
return $this->_model;
|
|
}
|
|
|
|
public function create(FreeboardEntity $entity, array $formDatas = []): FreeboardEntity
|
|
{
|
|
$entity = $this->getModel()->create($entity, $formDatas);
|
|
log_message("debug", __FUNCTION__ . "=>등록이 완료되었습니다.");
|
|
return $entity;
|
|
}
|
|
}
|