48 lines
1.3 KiB
PHP
48 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Services\Customer;
|
|
|
|
use App\Services\CommonService;
|
|
use CodeIgniter\HTTP\IncomingRequest;
|
|
|
|
use App\Services\Customer\AccountService;
|
|
use App\Services\Customer\CouponService;
|
|
use App\Services\Customer\PointService;
|
|
|
|
abstract class CustomerService extends CommonService
|
|
{
|
|
private ?AccountService $_accountService = null;
|
|
private ?CouponService $_couponService = null;
|
|
private ?PointService $_pointService = null;
|
|
public function __construct(?IncomingRequest $request = null)
|
|
{
|
|
parent::__construct($request);
|
|
}
|
|
public function getClassName(): string
|
|
{
|
|
return "Customer";
|
|
}
|
|
|
|
final public function getAccountService(): AccountService
|
|
{
|
|
if (!$this->_accountService) {
|
|
$this->_accountService = new AccountService($this->getRequest());
|
|
}
|
|
return $this->_accountService;
|
|
}
|
|
final public function getCouponService(): CouponService
|
|
{
|
|
if (!$this->_couponService) {
|
|
$this->_couponService = new CouponService($this->getRequest());
|
|
}
|
|
return $this->_couponService;
|
|
}
|
|
final public function getPointService(): PointService
|
|
{
|
|
if (!$this->_pointService) {
|
|
$this->_pointService = new PointService($this->getRequest());
|
|
}
|
|
return $this->_pointService;
|
|
}
|
|
}
|