38 lines
921 B
PHP
38 lines
921 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
use App\Models\MapurlModel;
|
|
use App\Entities\MapurlEntity;
|
|
|
|
class MapurlService extends CommonService
|
|
{
|
|
private $_view_path = "";
|
|
private ?MapurlModel $_model = null;
|
|
public function __construct()
|
|
{
|
|
$this->class_name = "Mapurl";
|
|
parent::__construct();
|
|
$this->class_path .= $this->class_name;
|
|
}
|
|
protected function getModel(): MapurlModel
|
|
{
|
|
if ($this->_model === null) {
|
|
$this->_model = new MapurlModel();
|
|
}
|
|
return $this->_model;
|
|
}
|
|
public function create(array $formDatas): MapurlEntity
|
|
{
|
|
return $this->getModel()->create($formDatas);
|
|
}
|
|
public function modify(MapurlEntity $entity, array $formDatas): MapurlEntity
|
|
{
|
|
return $this->getModel()->modify($entity, $formDatas);
|
|
}
|
|
public function delete(): void
|
|
{
|
|
$this->getModel()->delete();
|
|
}
|
|
}
|