diff --git a/app/Controllers/CLI/Payment.php b/app/Controllers/CLI/Payment.php index 4f9f764..21281e9 100644 --- a/app/Controllers/CLI/Payment.php +++ b/app/Controllers/CLI/Payment.php @@ -14,6 +14,7 @@ use Psr\Log\LoggerInterface; class Payment extends BaseController { private $_db; + private ?ServiceService $_serviceService = null; private ?ServiceItemService $_servicItemeService = null; private ?ServicePaymentService $_servicePaymentService = null; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) @@ -21,6 +22,13 @@ class Payment extends BaseController parent::initController($request, $response, $logger); $this->_db = \Config\Database::connect(); } + public function getServiceService(): ServiceService + { + if (!$this->_serviceService) { + $this->_serviceService = new ServiceService(); + } + return $this->_serviceService; + } public function getServiceItemService(): ServiceItemService { if (!$this->_servicItemeService) {