58 lines
1.8 KiB
PHP
58 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Controllers\Admin\Customer;
|
|
|
|
use App\Controllers\Admin\AdminController;
|
|
use CodeIgniter\HTTP\RequestInterface;
|
|
use CodeIgniter\HTTP\ResponseInterface;
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
use App\Services\Customer\ServiceService;
|
|
use App\Services\Customer\AccountService;
|
|
use App\Services\Customer\CouponService;
|
|
use App\Services\Customer\PointService;
|
|
|
|
abstract class CustomerController extends AdminController
|
|
{
|
|
private ?ServiceService $_serviceService = null;
|
|
private ?AccountService $_accountService = null;
|
|
private ?CouponService $_couponService = null;
|
|
private ?PointService $_pointService = null;
|
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
|
{
|
|
parent::initController($request, $response, $logger);
|
|
$this->uri_path .= 'customer/';
|
|
// $this->view_path .= "customer" . DIRECTORY_SEPARATOR;
|
|
}
|
|
|
|
final public function getServiceService(): ServiceService
|
|
{
|
|
if (!$this->_serviceService) {
|
|
$this->_serviceService = new ServiceService($this->request);
|
|
}
|
|
return $this->_serviceService;
|
|
}
|
|
final public function getAccountService(): AccountService
|
|
{
|
|
if (!$this->_accountService) {
|
|
$this->_accountService = new AccountService($this->request);
|
|
}
|
|
return $this->_accountService;
|
|
}
|
|
final public function getCouponService(): CouponService
|
|
{
|
|
if (!$this->_couponService) {
|
|
$this->_couponService = new CouponService($this->request);
|
|
}
|
|
return $this->_couponService;
|
|
}
|
|
final public function getPointService(): PointService
|
|
{
|
|
if (!$this->_pointService) {
|
|
$this->_pointService = new PointService($this->request);
|
|
}
|
|
return $this->_pointService;
|
|
}
|
|
//Index,FieldForm관련
|
|
}
|