40 lines
832 B
PHP
40 lines
832 B
PHP
<?php
|
|
|
|
namespace App\Services\Cloudflare;
|
|
|
|
use App\Entities\Cloudflare\AuthEntity;
|
|
use App\Models\Cloudflare\AuthModel;
|
|
|
|
class AuthService extends CloudflareService
|
|
{
|
|
private ?AuthModel $_model = null;
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct("Auth");
|
|
}
|
|
|
|
public function getModel(): AuthModel
|
|
{
|
|
if ($this->_model === null) {
|
|
$this->_model = new AuthModel();
|
|
}
|
|
return $this->_model;
|
|
}
|
|
|
|
public function create(array $formDatas): AuthEntity
|
|
{
|
|
return $this->getModel()->create($formDatas);
|
|
}
|
|
|
|
public function modify(AuthEntity $entity, array $formDatas): AuthEntity
|
|
{
|
|
return $this->getModel()->modify($entity, $formDatas);
|
|
}
|
|
|
|
public function delete(): void
|
|
{
|
|
$this->getModel()->delete();
|
|
}
|
|
}
|