diff --git a/app/Controllers/Admin/Customer/AccountController.php b/app/Controllers/Admin/Customer/AccountController.php index 564f8ef..ee31ef1 100644 --- a/app/Controllers/Admin/Customer/AccountController.php +++ b/app/Controllers/Admin/Customer/AccountController.php @@ -23,7 +23,7 @@ class AccountController extends CustomerController public function getService(): AccountService { if (!$this->_service) { - $this->_service = new AccountService($this->request); + $this->_service = new AccountService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Customer/ClientController.php b/app/Controllers/Admin/Customer/ClientController.php index 31590bc..d0d0fd1 100644 --- a/app/Controllers/Admin/Customer/ClientController.php +++ b/app/Controllers/Admin/Customer/ClientController.php @@ -24,7 +24,7 @@ class ClientController extends CustomerController public function getService(): ClientService { if (!$this->_service) { - $this->_service = new ClientService($this->request); + $this->_service = new ClientService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Customer/CouponController.php b/app/Controllers/Admin/Customer/CouponController.php index b7f082f..2c3d5d7 100644 --- a/app/Controllers/Admin/Customer/CouponController.php +++ b/app/Controllers/Admin/Customer/CouponController.php @@ -23,7 +23,7 @@ class CouponController extends CustomerController public function getService(): CouponService { if (!$this->_service) { - $this->_service = new CouponService($this->request); + $this->_service = new CouponService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Customer/CustomerController.php b/app/Controllers/Admin/Customer/CustomerController.php index 0ce701c..a5d1714 100644 --- a/app/Controllers/Admin/Customer/CustomerController.php +++ b/app/Controllers/Admin/Customer/CustomerController.php @@ -19,7 +19,7 @@ abstract class CustomerController extends AdminController public function getServiceService(): ServiceService { if (!$this->_serviceService) { - $this->_serviceService = new ServiceService($this->request); + $this->_serviceService = new ServiceService(); } return $this->_serviceService; } diff --git a/app/Controllers/Admin/Customer/PointController.php b/app/Controllers/Admin/Customer/PointController.php index bfeff37..4c20f74 100644 --- a/app/Controllers/Admin/Customer/PointController.php +++ b/app/Controllers/Admin/Customer/PointController.php @@ -23,7 +23,7 @@ class PointController extends CustomerController public function getService(): PointService { if (!$this->_service) { - $this->_service = new PointService($this->request); + $this->_service = new PointService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Customer/ServiceController.php b/app/Controllers/Admin/Customer/ServiceController.php index 94b1a73..41367d2 100644 --- a/app/Controllers/Admin/Customer/ServiceController.php +++ b/app/Controllers/Admin/Customer/ServiceController.php @@ -28,7 +28,7 @@ class ServiceController extends CustomerController public function getService(): ServiceService { if (!$this->_service) { - $this->_service = new ServiceService($this->request); + $this->_service = new ServiceService(); } return $this->_service; } @@ -42,14 +42,14 @@ class ServiceController extends CustomerController public function getCodeService(): CodeService { if (!$this->_codeService) { - $this->_codeService = new CodeService($this->request); + $this->_codeService = new CodeService(); } return $this->_codeService; } public function getServicePaymentService(): ServicePaymentService { if (!$this->_servicePaymentService) { - $this->_servicePaymentService = new ServicePaymentService($this->request); + $this->_servicePaymentService = new ServicePaymentService(); } return $this->_servicePaymentService; } diff --git a/app/Controllers/Admin/Customer/ServiceHistoryController.php b/app/Controllers/Admin/Customer/ServiceHistoryController.php index 9428da2..b62537a 100644 --- a/app/Controllers/Admin/Customer/ServiceHistoryController.php +++ b/app/Controllers/Admin/Customer/ServiceHistoryController.php @@ -27,7 +27,7 @@ class ServiceHistoryController extends CustomerController public function getService(): ServiceHistoryService { if (!$this->_service) { - $this->_service = new ServiceHistoryService($this->request); + $this->_service = new ServiceHistoryService(); } return $this->_service; } @@ -41,7 +41,7 @@ class ServiceHistoryController extends CustomerController public function getServiceService(): ServiceService { if (!$this->_serviceService) { - $this->_serviceService = new ServiceService($this->request); + $this->_serviceService = new ServiceService(); } return $this->_serviceService; } diff --git a/app/Controllers/Admin/Customer/ServiceItemController.php b/app/Controllers/Admin/Customer/ServiceItemController.php index 94404dc..7412e5a 100644 --- a/app/Controllers/Admin/Customer/ServiceItemController.php +++ b/app/Controllers/Admin/Customer/ServiceItemController.php @@ -39,7 +39,7 @@ class ServiceItemController extends CustomerController public function getService(): ServiceItemService { if (!$this->_service) { - $this->_service = new ServiceItemService($this->request); + $this->_service = new ServiceItemService(); } return $this->_service; } @@ -53,7 +53,7 @@ class ServiceItemController extends CustomerController public function getServiceService(): ServiceService { if (!$this->_serviceService) { - $this->_serviceService = new ServiceService($this->request); + $this->_serviceService = new ServiceService(); } return $this->_serviceService; } diff --git a/app/Controllers/Admin/Customer/ServicePaymentController.php b/app/Controllers/Admin/Customer/ServicePaymentController.php index 410dac3..6c66e8f 100644 --- a/app/Controllers/Admin/Customer/ServicePaymentController.php +++ b/app/Controllers/Admin/Customer/ServicePaymentController.php @@ -32,7 +32,7 @@ class ServicePaymentController extends CustomerController public function getService(): ServicePaymentService { if (!$this->_service) { - $this->_service = new ServicePaymentService($this->request); + $this->_service = new ServicePaymentService(); } return $this->_service; } @@ -46,14 +46,14 @@ class ServicePaymentController extends CustomerController public function getServiceService(): ServiceService { if (!$this->_serviceService) { - $this->_serviceService = new ServiceService($this->request); + $this->_serviceService = new ServiceService(); } return $this->_serviceService; } public function getClientService(): ClientService { if (!$this->_clientService) { - $this->_clientService = new ClientService($this->request); + $this->_clientService = new ClientService(); } return $this->_clientService; } diff --git a/app/Controllers/Admin/Equipment/CodeController.php b/app/Controllers/Admin/Equipment/CodeController.php index b1a86f6..6bf5873 100644 --- a/app/Controllers/Admin/Equipment/CodeController.php +++ b/app/Controllers/Admin/Equipment/CodeController.php @@ -23,7 +23,7 @@ class CodeController extends EquipmentController public function getService(): CodeService { if (!$this->_service) { - $this->_service = new CodeService($this->request); + $this->_service = new CodeService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Equipment/DomainController.php b/app/Controllers/Admin/Equipment/DomainController.php index bf5aa84..bee1901 100644 --- a/app/Controllers/Admin/Equipment/DomainController.php +++ b/app/Controllers/Admin/Equipment/DomainController.php @@ -24,7 +24,7 @@ class DomainController extends EquipmentController public function getService(): DomainService { if (!$this->_service) { - $this->_service = new DomainService($this->request); + $this->_service = new DomainService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Equipment/EquipmentController.php b/app/Controllers/Admin/Equipment/EquipmentController.php index 9da942f..7112231 100644 --- a/app/Controllers/Admin/Equipment/EquipmentController.php +++ b/app/Controllers/Admin/Equipment/EquipmentController.php @@ -18,7 +18,7 @@ abstract class EquipmentController extends AdminController final public function getClientService(): ClientService { if (!$this->_clientService) { - $this->_clientService = new ClientService($this->request); + $this->_clientService = new ClientService(); } return $this->_clientService; } diff --git a/app/Controllers/Admin/Equipment/Part/CpuController.php b/app/Controllers/Admin/Equipment/Part/CpuController.php index ce49673..3b981fe 100644 --- a/app/Controllers/Admin/Equipment/Part/CpuController.php +++ b/app/Controllers/Admin/Equipment/Part/CpuController.php @@ -23,7 +23,7 @@ class CpuController extends PartController public function getService(): CpuService { if (!$this->_service) { - $this->_service = new CpuService($this->request); + $this->_service = new CpuService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Equipment/Part/DefenceController.php b/app/Controllers/Admin/Equipment/Part/DefenceController.php index 8c95702..12b9206 100644 --- a/app/Controllers/Admin/Equipment/Part/DefenceController.php +++ b/app/Controllers/Admin/Equipment/Part/DefenceController.php @@ -23,7 +23,7 @@ class DefenceController extends PartController public function getService(): DefenceService { if (!$this->_service) { - $this->_service = new DefenceService($this->request); + $this->_service = new DefenceService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Equipment/Part/IpController.php b/app/Controllers/Admin/Equipment/Part/IpController.php index 7a743cb..26c1e24 100644 --- a/app/Controllers/Admin/Equipment/Part/IpController.php +++ b/app/Controllers/Admin/Equipment/Part/IpController.php @@ -26,7 +26,7 @@ class IpController extends PartController public function getService(): IpService { if (!$this->_service) { - $this->_service = new IpService($this->request); + $this->_service = new IpService(); } return $this->_service; } @@ -40,7 +40,7 @@ class IpController extends PartController final public function getLineService(): LineService { if (!$this->_lineService) { - $this->_lineService = new LineService($this->request); + $this->_lineService = new LineService(); } return $this->_lineService; } diff --git a/app/Controllers/Admin/Equipment/Part/LineController.php b/app/Controllers/Admin/Equipment/Part/LineController.php index 1b96616..3af1e08 100644 --- a/app/Controllers/Admin/Equipment/Part/LineController.php +++ b/app/Controllers/Admin/Equipment/Part/LineController.php @@ -27,7 +27,7 @@ class LineController extends PartController public function getService(): LineService { if (!$this->_service) { - $this->_service = new LineService($this->request); + $this->_service = new LineService(); } return $this->_service; } @@ -41,7 +41,7 @@ class LineController extends PartController final public function getIpService(): IpService { if (!$this->_ipService) { - $this->_ipService = new IpService($this->request); + $this->_ipService = new IpService(); } return $this->_ipService; } diff --git a/app/Controllers/Admin/Equipment/Part/RamController.php b/app/Controllers/Admin/Equipment/Part/RamController.php index 413cf7b..924a465 100644 --- a/app/Controllers/Admin/Equipment/Part/RamController.php +++ b/app/Controllers/Admin/Equipment/Part/RamController.php @@ -23,7 +23,7 @@ class RamController extends PartController public function getService(): RamService { if (!$this->_service) { - $this->_service = new RamService($this->request); + $this->_service = new RamService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Equipment/Part/SoftwareController.php b/app/Controllers/Admin/Equipment/Part/SoftwareController.php index 92f5236..dc77601 100644 --- a/app/Controllers/Admin/Equipment/Part/SoftwareController.php +++ b/app/Controllers/Admin/Equipment/Part/SoftwareController.php @@ -24,7 +24,7 @@ class SoftwareController extends PartController public function getService(): SoftwareService { if (!$this->_service) { - $this->_service = new SoftwareService($this->request); + $this->_service = new SoftwareService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Equipment/Part/StorageController.php b/app/Controllers/Admin/Equipment/Part/StorageController.php index 011c976..0c83b4a 100644 --- a/app/Controllers/Admin/Equipment/Part/StorageController.php +++ b/app/Controllers/Admin/Equipment/Part/StorageController.php @@ -23,7 +23,7 @@ class StorageController extends PartController public function getService(): StorageService { if (!$this->_service) { - $this->_service = new StorageService($this->request); + $this->_service = new StorageService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Equipment/ServerController.php b/app/Controllers/Admin/Equipment/ServerController.php index 571e12f..2f8575a 100644 --- a/app/Controllers/Admin/Equipment/ServerController.php +++ b/app/Controllers/Admin/Equipment/ServerController.php @@ -23,7 +23,7 @@ class ServerController extends EquipmentController public function getService(): ServerService { if (!$this->_service) { - $this->_service = new ServerService($this->request); + $this->_service = new ServerService(); } return $this->_service; } diff --git a/app/Controllers/Admin/Home.php b/app/Controllers/Admin/Home.php index 730a6cf..aea4aba 100644 --- a/app/Controllers/Admin/Home.php +++ b/app/Controllers/Admin/Home.php @@ -27,7 +27,7 @@ class Home extends AdminController final public function getService(): ServiceService { if (!$this->_service) { - $this->_service = new ServiceService($this->request); + $this->_service = new ServiceService(); } return $this->_service; } @@ -41,7 +41,7 @@ class Home extends AdminController final public function getServicePaymentService(): ServicePaymentService { if (!$this->_servicePaymentService) { - $this->_servicePaymentService = new ServicePaymentService($this->request); + $this->_servicePaymentService = new ServicePaymentService(); } return $this->_servicePaymentService; } diff --git a/app/Controllers/Admin/MyLogController.php b/app/Controllers/Admin/MyLogController.php index b040c71..044890d 100644 --- a/app/Controllers/Admin/MyLogController.php +++ b/app/Controllers/Admin/MyLogController.php @@ -25,7 +25,7 @@ class MyLogController extends AdminController final public function getService(): MyLogService { if (!$this->_service) { - $this->_service = new MyLogService($this->request); + $this->_service = new MyLogService(); } return $this->_service; } diff --git a/app/Controllers/Admin/UserController.php b/app/Controllers/Admin/UserController.php index 193eedf..cfac38e 100644 --- a/app/Controllers/Admin/UserController.php +++ b/app/Controllers/Admin/UserController.php @@ -28,7 +28,7 @@ class UserController extends AdminController final public function getService(): UserService { if (!$this->_service) { - $this->_service = new UserService($this->request); + $this->_service = new UserService(); } return $this->_service; } diff --git a/app/Controllers/Auth/LocalController.php b/app/Controllers/Auth/LocalController.php index 6e7c3b1..dd461ef 100644 --- a/app/Controllers/Auth/LocalController.php +++ b/app/Controllers/Auth/LocalController.php @@ -19,7 +19,7 @@ class LocalController extends AuthController final public function getService(): LocalService { if (!$this->_service) { - $this->_service = new LocalService($this->request); + $this->_service = new LocalService(); } return $this->_service; } diff --git a/app/Controllers/CLI/Payment.php b/app/Controllers/CLI/Payment.php index fba8934..20603b5 100644 --- a/app/Controllers/CLI/Payment.php +++ b/app/Controllers/CLI/Payment.php @@ -24,21 +24,21 @@ class Payment extends BaseController public function getServiceService(): ServiceService { if (!$this->_serviceService) { - $this->_serviceService = new ServiceService($this->request); + $this->_serviceService = new ServiceService(); } return $this->_serviceService; } public function getServiceItemService(): ServiceItemService { if (!$this->_servicItemeService) { - $this->_servicItemeService = new ServiceItemService($this->request); + $this->_servicItemeService = new ServiceItemService(); } return $this->_servicItemeService; } public function getServicePaymentService(): ServicePaymentService { if (!$this->_servicePaymentService) { - $this->_servicePaymentService = new ServicePaymentService($this->request); + $this->_servicePaymentService = new ServicePaymentService(); } return $this->_servicePaymentService; } diff --git a/app/Controllers/CommonController.php b/app/Controllers/CommonController.php index 65adbca..f0d4787 100644 --- a/app/Controllers/CommonController.php +++ b/app/Controllers/CommonController.php @@ -30,6 +30,7 @@ abstract class CommonController extends BaseController { parent::initController($request, $response, $logger); $this->isLoggedIn = false; + $this->uri = $request->getUri(); if ($this->getMyAuth()->isLoggedIn()) { $this->isLoggedIn = true; $this->myAuthName = $this->getMyAuth()->getNameByAuthInfo(); @@ -61,7 +62,7 @@ abstract class CommonController extends BaseController final public function getMyLogService(): mixed { if (!$this->_myLogService) { - $this->_myLogService = new MyLogService($this->request); + $this->_myLogService = new MyLogService(); } return $this->_myLogService; } diff --git a/app/Helpers/AuthHelper.php b/app/Helpers/AuthHelper.php index f1c7647..b9faba2 100644 --- a/app/Helpers/AuthHelper.php +++ b/app/Helpers/AuthHelper.php @@ -10,7 +10,7 @@ class AuthHelper extends CommonHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(UserModel::TITLE); } public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string diff --git a/app/Helpers/CommonHelper.php b/app/Helpers/CommonHelper.php index 86f9d87..9e68eb4 100644 --- a/app/Helpers/CommonHelper.php +++ b/app/Helpers/CommonHelper.php @@ -2,18 +2,12 @@ namespace App\Helpers; -use CodeIgniter\HTTP\IncomingRequest; - class CommonHelper { private $_myAuth = null; private $_viewDatas = []; private $_titleField = ""; - private ?IncomingRequest $_request = null; - protected function __construct(?IncomingRequest $request = null) - { - $this->_request = $request; - } + protected function __construct() {} final protected function getMyAuth(): mixed { if (!$this->_myAuth) { @@ -21,10 +15,6 @@ class CommonHelper } return $this->_myAuth; } - final public function getRequest(): IncomingRequest|null - { - return $this->_request; - } final public function setTitleField(string $field): void { $this->_titleField = $field; @@ -353,7 +343,7 @@ class CommonHelper if (isset($viewDatas['order_field']) && $viewDatas['order_field'] == $field) { $label .= $viewDatas['order_value'] == 'ASC' ? ICONS["UP"] : ICONS["DOWN"]; } - $query = $this->getRequest()->getUri()->getQuery(['except' => ['order_field', 'order_value']]); + $query = $viewDatas['uri']->getQuery(['except' => ['order_field', 'order_value']]); $query .= empty($query) ? "" : "&"; $query .= "order_field={$field}&order_value="; $query .= isset($viewDatas['order_value']) && $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC"; @@ -367,13 +357,13 @@ class CommonHelper { switch ($action) { case 'create': - // echo current_url() . '/' . $action . '?' . $this->getRequest()->getUri()->getQuery(); + // echo current_url() . '/' . $action . '?' . $viewDatas['uri']->getQuery(); $extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras]; $action = form_label( array_key_exists('label', $extras) ? $extras['label'] : ICONS['ADD'], $action, [ - "data-src" => current_url() . '/' . $action . '?' . $this->getRequest()->getUri()->getQuery(), + "data-src" => current_url() . '/' . $action . '?' . $viewDatas['uri']->getQuery(), "data-bs-toggle" => "modal", "data-bs-target" => "#index_action_form", ...$extras @@ -394,7 +384,7 @@ class CommonHelper $viewDatas['cnt'], $action, [ - "data-src" => current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK() . '?' . $this->getRequest()->getUri()->getQuery(), + "data-src" => current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK() . '?' . $viewDatas['uri']->getQuery(), "data-bs-toggle" => "modal", "data-bs-target" => "#index_action_form", ...$extras diff --git a/app/Helpers/Customer/AccountHelper.php b/app/Helpers/Customer/AccountHelper.php index 0408764..935f85d 100644 --- a/app/Helpers/Customer/AccountHelper.php +++ b/app/Helpers/Customer/AccountHelper.php @@ -10,7 +10,7 @@ class AccountHelper extends CustomerHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(AccountModel::TITLE); } public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null diff --git a/app/Helpers/Customer/ClientHelper.php b/app/Helpers/Customer/ClientHelper.php index d6f0fb0..b97ebff 100644 --- a/app/Helpers/Customer/ClientHelper.php +++ b/app/Helpers/Customer/ClientHelper.php @@ -10,7 +10,7 @@ class ClientHelper extends CustomerHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(ClientModel::TITLE); } public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null diff --git a/app/Helpers/Customer/CouponHelper.php b/app/Helpers/Customer/CouponHelper.php index 8b47dea..4fdcf0f 100644 --- a/app/Helpers/Customer/CouponHelper.php +++ b/app/Helpers/Customer/CouponHelper.php @@ -10,7 +10,7 @@ class CouponHelper extends CustomerHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(CouponModel::TITLE); } public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null diff --git a/app/Helpers/Customer/CustomerHelper.php b/app/Helpers/Customer/CustomerHelper.php index 4694373..dee7172 100644 --- a/app/Helpers/Customer/CustomerHelper.php +++ b/app/Helpers/Customer/CustomerHelper.php @@ -9,6 +9,6 @@ abstract class CustomerHelper extends CommonHelper { protected function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); } } diff --git a/app/Helpers/Customer/PointHelper.php b/app/Helpers/Customer/PointHelper.php index 8e735bc..2db937b 100644 --- a/app/Helpers/Customer/PointHelper.php +++ b/app/Helpers/Customer/PointHelper.php @@ -10,7 +10,7 @@ class PointHelper extends CustomerHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: PointModel::TITLE); } diff --git a/app/Helpers/Customer/ServiceHelper.php b/app/Helpers/Customer/ServiceHelper.php index ecfadc9..6acfa5f 100644 --- a/app/Helpers/Customer/ServiceHelper.php +++ b/app/Helpers/Customer/ServiceHelper.php @@ -11,7 +11,7 @@ class ServiceHelper extends CustomerHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: ServiceModel::TITLE); } public function getFieldLabel(string $field, array $viewDatas, array $extras = []): string diff --git a/app/Helpers/Customer/ServiceHistoryHelper.php b/app/Helpers/Customer/ServiceHistoryHelper.php index 0024984..5d3bb20 100644 --- a/app/Helpers/Customer/ServiceHistoryHelper.php +++ b/app/Helpers/Customer/ServiceHistoryHelper.php @@ -10,7 +10,7 @@ class ServiceHistoryHelper extends CustomerHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: ServiceHistoryModel::TITLE); } } diff --git a/app/Helpers/Customer/ServiceItemHelper.php b/app/Helpers/Customer/ServiceItemHelper.php index 22978e6..1b42a7d 100644 --- a/app/Helpers/Customer/ServiceItemHelper.php +++ b/app/Helpers/Customer/ServiceItemHelper.php @@ -12,7 +12,7 @@ class ServiceItemHelper extends CustomerHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: ServiceItemModel::TITLE); } diff --git a/app/Helpers/Customer/ServicePaymentHelper.php b/app/Helpers/Customer/ServicePaymentHelper.php index d324338..15f0537 100644 --- a/app/Helpers/Customer/ServicePaymentHelper.php +++ b/app/Helpers/Customer/ServicePaymentHelper.php @@ -10,7 +10,7 @@ class ServicePaymentHelper extends CustomerHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: ServicePaymentModel::TITLE); } diff --git a/app/Helpers/Equipment/CodeHelper.php b/app/Helpers/Equipment/CodeHelper.php index 021f617..063d4fb 100644 --- a/app/Helpers/Equipment/CodeHelper.php +++ b/app/Helpers/Equipment/CodeHelper.php @@ -10,7 +10,7 @@ class CodeHelper extends EquipmentHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: CodeModel::TITLE); } } diff --git a/app/Helpers/Equipment/DomainHelper.php b/app/Helpers/Equipment/DomainHelper.php index 6d1f129..04e5196 100644 --- a/app/Helpers/Equipment/DomainHelper.php +++ b/app/Helpers/Equipment/DomainHelper.php @@ -10,7 +10,7 @@ class DomainHelper extends EquipmentHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: DomainModel::TITLE); } } diff --git a/app/Helpers/Equipment/EquipmentHelper.php b/app/Helpers/Equipment/EquipmentHelper.php index f963d57..72dec4b 100644 --- a/app/Helpers/Equipment/EquipmentHelper.php +++ b/app/Helpers/Equipment/EquipmentHelper.php @@ -9,6 +9,6 @@ abstract class EquipmentHelper extends CommonHelper { protected function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); } } diff --git a/app/Helpers/Equipment/Part/CpuHelper.php b/app/Helpers/Equipment/Part/CpuHelper.php index 7c32680..fb55e44 100644 --- a/app/Helpers/Equipment/Part/CpuHelper.php +++ b/app/Helpers/Equipment/Part/CpuHelper.php @@ -10,7 +10,7 @@ class CpuHelper extends PartHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: CpuModel::TITLE); } } diff --git a/app/Helpers/Equipment/Part/DefenceHelper.php b/app/Helpers/Equipment/Part/DefenceHelper.php index cbcd8c2..fc9331b 100644 --- a/app/Helpers/Equipment/Part/DefenceHelper.php +++ b/app/Helpers/Equipment/Part/DefenceHelper.php @@ -10,7 +10,7 @@ class DefenceHelper extends PartHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: DefenceModel::TITLE); } } diff --git a/app/Helpers/Equipment/Part/IpHelper.php b/app/Helpers/Equipment/Part/IpHelper.php index 7ff1977..8031d33 100644 --- a/app/Helpers/Equipment/Part/IpHelper.php +++ b/app/Helpers/Equipment/Part/IpHelper.php @@ -10,7 +10,7 @@ class IpHelper extends PartHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: IpModel::TITLE); } } diff --git a/app/Helpers/Equipment/Part/LineHelper.php b/app/Helpers/Equipment/Part/LineHelper.php index ec720a4..2bc1299 100644 --- a/app/Helpers/Equipment/Part/LineHelper.php +++ b/app/Helpers/Equipment/Part/LineHelper.php @@ -10,7 +10,7 @@ class LineHelper extends PartHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: LineModel::TITLE); } } diff --git a/app/Helpers/Equipment/Part/PartHelper.php b/app/Helpers/Equipment/Part/PartHelper.php index e209658..96fdff6 100644 --- a/app/Helpers/Equipment/Part/PartHelper.php +++ b/app/Helpers/Equipment/Part/PartHelper.php @@ -9,6 +9,6 @@ abstract class PartHelper extends EquipmentHelper { protected function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); } } diff --git a/app/Helpers/Equipment/Part/RamHelper.php b/app/Helpers/Equipment/Part/RamHelper.php index d5e3509..c65eacf 100644 --- a/app/Helpers/Equipment/Part/RamHelper.php +++ b/app/Helpers/Equipment/Part/RamHelper.php @@ -10,7 +10,7 @@ class RamHelper extends PartHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: RamModel::TITLE); } } diff --git a/app/Helpers/Equipment/Part/SoftwareHelper.php b/app/Helpers/Equipment/Part/SoftwareHelper.php index e47957b..442960a 100644 --- a/app/Helpers/Equipment/Part/SoftwareHelper.php +++ b/app/Helpers/Equipment/Part/SoftwareHelper.php @@ -10,7 +10,7 @@ class SoftwareHelper extends PartHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: SoftwareModel::TITLE); } } diff --git a/app/Helpers/Equipment/Part/StorageHelper.php b/app/Helpers/Equipment/Part/StorageHelper.php index 27aef01..cee6d35 100644 --- a/app/Helpers/Equipment/Part/StorageHelper.php +++ b/app/Helpers/Equipment/Part/StorageHelper.php @@ -10,7 +10,7 @@ class StorageHelper extends PartHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: StorageModel::TITLE); } } diff --git a/app/Helpers/Equipment/ServerHelper.php b/app/Helpers/Equipment/ServerHelper.php index c05e7b0..002e2f2 100644 --- a/app/Helpers/Equipment/ServerHelper.php +++ b/app/Helpers/Equipment/ServerHelper.php @@ -10,7 +10,7 @@ class ServerHelper extends EquipmentHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: ServerModel::TITLE); } } diff --git a/app/Helpers/HomeHelper.php b/app/Helpers/HomeHelper.php index 4890f98..d8b8192 100644 --- a/app/Helpers/HomeHelper.php +++ b/app/Helpers/HomeHelper.php @@ -10,7 +10,7 @@ class HomeHelper extends CommonHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(field: ServicePaymentModel::TITLE); } diff --git a/app/Helpers/MyLogHelper.php b/app/Helpers/MyLogHelper.php index c9b9d03..08c2597 100644 --- a/app/Helpers/MyLogHelper.php +++ b/app/Helpers/MyLogHelper.php @@ -10,7 +10,7 @@ class MyLogHelper extends CommonHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(MyLogModel::TITLE); } public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null diff --git a/app/Helpers/UserHelper.php b/app/Helpers/UserHelper.php index 1435598..356e28f 100644 --- a/app/Helpers/UserHelper.php +++ b/app/Helpers/UserHelper.php @@ -10,7 +10,7 @@ class UserHelper extends CommonHelper protected ?IncomingRequest $request = null; public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->setTitleField(UserModel::TITLE); } public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string diff --git a/app/Services/Auth/AuthService.php b/app/Services/Auth/AuthService.php index b0a0b1a..08ef267 100644 --- a/app/Services/Auth/AuthService.php +++ b/app/Services/Auth/AuthService.php @@ -14,7 +14,7 @@ abstract class AuthService extends CommonService private $url_stack_name = "url_stack"; protected function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->addClassName('Auth'); } abstract public function login(array $formDatas): UserEntity; diff --git a/app/Services/Auth/GoogleService.php b/app/Services/Auth/GoogleService.php index 26ed9d6..17d72ff 100644 --- a/app/Services/Auth/GoogleService.php +++ b/app/Services/Auth/GoogleService.php @@ -14,7 +14,7 @@ class GoogleService extends AuthService public function __construct(mixed $mySocket, ?IncomingRequest $request = null) { $this->_mySocket = $mySocket; - parent::__construct($request); + parent::__construct(); $this->addClassName('Google'); } public function getMySocket(): mixed diff --git a/app/Services/Auth/LocalService.php b/app/Services/Auth/LocalService.php index 5bb1369..4b649df 100644 --- a/app/Services/Auth/LocalService.php +++ b/app/Services/Auth/LocalService.php @@ -10,7 +10,7 @@ class LocalService extends AuthService { public function __construct(?IncomingRequest $request = null) { - parent::__construct($request); + parent::__construct(); $this->addClassName('Local'); } final public function getModelClass(): UserModel diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php index b26ff61..6740f9d 100644 --- a/app/Services/CommonService.php +++ b/app/Services/CommonService.php @@ -11,11 +11,7 @@ abstract class CommonService private $_model = null; private $_classNames = []; private $_myAuth = null; - private $_request = null; - protected function __construct(mixed $_request = null) - { - $this->_request = $_request; - } + protected function __construct() {} abstract public function getModelClass(): mixed; abstract public function getEntityClass(): mixed; abstract public function getFormFields(): array; @@ -28,10 +24,6 @@ abstract class CommonService } return $this->_myAuth; } - final public function getRequest(): mixed - { - return $this->_request; - } public function getIndexFields(): array { return $this->getFormFields(); diff --git a/app/Services/Customer/AccountService.php b/app/Services/Customer/AccountService.php index 159353e..326551c 100644 --- a/app/Services/Customer/AccountService.php +++ b/app/Services/Customer/AccountService.php @@ -8,9 +8,9 @@ use App\Entities\Customer\ClientEntity; class AccountService extends CustomerService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Account'); } public function getModelClass(): AccountModel diff --git a/app/Services/Customer/ClientService.php b/app/Services/Customer/ClientService.php index ddb7534..cd58c04 100644 --- a/app/Services/Customer/ClientService.php +++ b/app/Services/Customer/ClientService.php @@ -7,9 +7,9 @@ use App\Models\Customer\ClientModel; class ClientService extends CustomerService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Client'); } public function getModelClass(): ClientModel diff --git a/app/Services/Customer/CouponService.php b/app/Services/Customer/CouponService.php index 60e486e..80f8d59 100644 --- a/app/Services/Customer/CouponService.php +++ b/app/Services/Customer/CouponService.php @@ -8,9 +8,9 @@ use App\Entities\Customer\ClientEntity; class CouponService extends CustomerService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Coupon'); } public function getModelClass(): CouponModel diff --git a/app/Services/Customer/CustomerService.php b/app/Services/Customer/CustomerService.php index 742d209..569cb1f 100644 --- a/app/Services/Customer/CustomerService.php +++ b/app/Services/Customer/CustomerService.php @@ -20,15 +20,15 @@ abstract class CustomerService extends CommonService { private ?ClientService $_clientService = null; private $_equipmentService = []; - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Customer'); } final public function getClientService(): ClientService { if (!$this->_clientService) { - $this->_clientService = new ClientService($this->request); + $this->_clientService = new ClientService(); } return $this->_clientService; } diff --git a/app/Services/Customer/PointService.php b/app/Services/Customer/PointService.php index bb5912c..6661de9 100644 --- a/app/Services/Customer/PointService.php +++ b/app/Services/Customer/PointService.php @@ -8,9 +8,9 @@ use App\Entities\Customer\ClientEntity; class PointService extends CustomerService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Point'); } public function getModelClass(): PointModel diff --git a/app/Services/Customer/ServiceHistoryService.php b/app/Services/Customer/ServiceHistoryService.php index 4a2cd84..4bd2f5a 100644 --- a/app/Services/Customer/ServiceHistoryService.php +++ b/app/Services/Customer/ServiceHistoryService.php @@ -9,9 +9,9 @@ use App\Services\Customer\ServiceService; class ServiceHistoryService extends CustomerService { private ?ServiceService $_serviceService = null; - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('ServiceHistory'); } public function getModelClass(): ServiceHistoryModel @@ -25,7 +25,7 @@ class ServiceHistoryService extends CustomerService public function getServiceService(): ServiceService { if (!$this->_serviceService) { - $this->_serviceService = new ServiceService($this->request); + $this->_serviceService = new ServiceService(); } return $this->_serviceService; } diff --git a/app/Services/Customer/ServiceItemService.php b/app/Services/Customer/ServiceItemService.php index 58e625c..1ec5be1 100644 --- a/app/Services/Customer/ServiceItemService.php +++ b/app/Services/Customer/ServiceItemService.php @@ -3,18 +3,21 @@ namespace App\Services\Customer; use App\Entities\Customer\ServiceItemEntity; +use App\Entities\Equipment\Part\IpEntity; use App\Models\Customer\ServiceItemModel; use App\Services\Customer\CustomerService; use App\Services\Customer\ServicePaymentService; use App\Services\Customer\ServiceService; +use App\Services\Equipment\Part\IpService; class ServiceItemService extends CustomerService { private ?ServiceService $_serviceService = null; private ?ServicePaymentService $_servicePaymentService = null; - public function __construct(mixed $request = null) + private ?IpService $_ipService = null; + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('ServiceItem'); } public function getModelClass(): ServiceItemModel @@ -28,14 +31,21 @@ class ServiceItemService extends CustomerService public function getServiceService(): ServiceService { if (!$this->_serviceService) { - $this->_serviceService = new ServiceService($this->request); + $this->_serviceService = new ServiceService(); } return $this->_serviceService; } + public function getIpService(): IpService + { + if (!$this->_ipService) { + $this->_ipService = new IpService(); + } + return $this->_ipService; + } public function getServicePaymentService(): ServicePaymentService { if (!$this->_servicePaymentService) { - $this->_servicePaymentService = new ServicePaymentService($this->request); + $this->_servicePaymentService = new ServicePaymentService(); } return $this->_servicePaymentService; } @@ -80,9 +90,27 @@ class ServiceItemService extends CustomerService } public function create(array $formDatas, mixed $entity = null): ServiceItemEntity { - $entity = parent::create($formDatas, $entity); //결제정보 ServicePaymentService에 등록 $this->getServicePaymentService()->createByServiceItem($entity); - return $entity; + return parent::create($formDatas, $entity); + } + public function modify(mixed $entity, array $formDatas): ServiceItemEntity + { + //IP가 기존과 다를경우 //toggle,batchjob의 경우 $formDatas에 code가 없을수도 있음 + if (array_key_exists('item_type', $formDatas) && $formDatas['item_type'] !== 'IP') { + //기존 IP의 경우 반환처리 + $this->getIpService()->setStatus($entity->getItemUID(), IpEntity::STATUS_AVAILABLE); + //신규 설정된 IP의 경우 서비스중 변경처리 + $this->getIpService()->setStatus($formDatas['item_uid'], IpEntity::STATUS_OCCUPIED); + } + return parent::modify($entity, $formDatas); + } + public function delete(mixed $entity): ServiceItemEntity + { + //기존 Ip의 경우 반환처리 + if ($entity->getItemType() === 'IP') { + $this->getIpService()->setStatus($entity->getItemUID(), IpEntity::STATUS_AVAILABLE); + } + return parent::delete($entity); } } diff --git a/app/Services/Customer/ServicePaymentService.php b/app/Services/Customer/ServicePaymentService.php index 03776cc..c656970 100644 --- a/app/Services/Customer/ServicePaymentService.php +++ b/app/Services/Customer/ServicePaymentService.php @@ -13,9 +13,9 @@ class ServicePaymentService extends CustomerService { private ?UserService $_userService = null; private ?ServiceService $_serviceService = null; - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('ServicePayment'); } public function getModelClass(): ServicePaymentModel @@ -55,14 +55,14 @@ class ServicePaymentService extends CustomerService public function getUSerService(): UserService { if (!$this->_userService) { - $this->_userService = new UserService($this->request); + $this->_userService = new UserService(); } return $this->_userService; } public function getServiceService(): ServiceService { if (!$this->_serviceService) { - $this->_serviceService = new ServiceService($this->request); + $this->_serviceService = new ServiceService(); } return $this->_serviceService; } diff --git a/app/Services/Customer/ServiceService.php b/app/Services/Customer/ServiceService.php index ab04e7f..d2ce8d6 100644 --- a/app/Services/Customer/ServiceService.php +++ b/app/Services/Customer/ServiceService.php @@ -9,7 +9,6 @@ use App\Entities\Equipment\Part\IpEntity; use App\Models\Customer\ServiceModel; use App\Services\Customer\ServiceItemService; use App\Services\Equipment\CodeService; -use App\Services\Equipment\Part\IpService; use App\Services\UserService; class ServiceService extends CustomerService @@ -18,11 +17,10 @@ class ServiceService extends CustomerService private ?CodeService $_codeService = null; private ?ServiceItemService $_serviceItemService = null; private ?ServicePaymentService $_servicePaymentService = null; - private ?IpService $_ipService = null; private ?string $_searchIP = null; - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Service'); } public function getModelClass(): ServiceModel @@ -63,35 +61,28 @@ class ServiceService extends CustomerService public function getUSerService(): UserService { if (!$this->_userService) { - $this->_userService = new UserService($this->request); + $this->_userService = new UserService(); } return $this->_userService; } public function getCodeService(): CodeService { if (!$this->_codeService) { - $this->_codeService = new CodeService($this->request); + $this->_codeService = new CodeService(); } return $this->_codeService; } public function getServiceItemService(): ServiceItemService { if (!$this->_serviceItemService) { - $this->_serviceItemService = new ServiceItemService($this->request); + $this->_serviceItemService = new ServiceItemService(); } return $this->_serviceItemService; } - public function getIpService(): IpService - { - if (!$this->_ipService) { - $this->_ipService = new IpService($this->request); - } - return $this->_ipService; - } public function getServicePaymentService(): ServicePaymentService { if (!$this->_servicePaymentService) { - $this->_servicePaymentService = new ServicePaymentService($this->request); + $this->_servicePaymentService = new ServicePaymentService(); } return $this->_servicePaymentService; } @@ -223,9 +214,11 @@ class ServiceService extends CustomerService { //기존 code의 경우 반환처리 $this->getCodeService()->setStatus($entity->getCode(), CodeEntity::STATUS_AVAILABLE); - //IP의 경우 반환 처리 - foreach ($entity->getItemEntities("IP") as $itemEntity) { - $this->getIpService()->setStatus($itemEntity->getItemUID(), IpEntity::STATUS_AVAILABLE); + //Item들 삭제 + foreach (SERVICE_ITEM_TYPES as $item_type => $label) { + foreach ($entity->getItemEntities($item_type) as $itemEntity) { + $this->getServiceItemService()->delete($itemEntity); + } } return parent::delete($entity); } diff --git a/app/Services/Equipment/CodeService.php b/app/Services/Equipment/CodeService.php index 8158e77..4ff2519 100644 --- a/app/Services/Equipment/CodeService.php +++ b/app/Services/Equipment/CodeService.php @@ -8,9 +8,9 @@ use App\Services\Equipment\EquipmentService; class CodeService extends EquipmentService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Code'); } public function getModelClass(): CodeModel diff --git a/app/Services/Equipment/DomainService.php b/app/Services/Equipment/DomainService.php index 39b059c..f1aa601 100644 --- a/app/Services/Equipment/DomainService.php +++ b/app/Services/Equipment/DomainService.php @@ -7,9 +7,9 @@ use App\Models\Equipment\DomainModel; class DomainService extends EquipmentService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Domain'); } public function getModelClass(): DomainModel diff --git a/app/Services/Equipment/EquipmentService.php b/app/Services/Equipment/EquipmentService.php index a7ac0b0..f53764c 100644 --- a/app/Services/Equipment/EquipmentService.php +++ b/app/Services/Equipment/EquipmentService.php @@ -8,16 +8,16 @@ use App\Services\Customer\ClientService; abstract class EquipmentService extends CommonService { private ?ClientService $_clientService = null; - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Equipment'); } final public function getClientService(): ClientService { if (!$this->_clientService) { - $this->_clientService = new ClientService($this->request); + $this->_clientService = new ClientService(); } return $this->_clientService; } diff --git a/app/Services/Equipment/Part/CpuService.php b/app/Services/Equipment/Part/CpuService.php index 6eb2523..8b97546 100644 --- a/app/Services/Equipment/Part/CpuService.php +++ b/app/Services/Equipment/Part/CpuService.php @@ -7,9 +7,9 @@ use App\Models\Equipment\Part\CpuModel; class CpuService extends PartService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Cpu'); } public function getModelClass(): CpuModel diff --git a/app/Services/Equipment/Part/DefenceService.php b/app/Services/Equipment/Part/DefenceService.php index 9935902..7345f22 100644 --- a/app/Services/Equipment/Part/DefenceService.php +++ b/app/Services/Equipment/Part/DefenceService.php @@ -7,9 +7,9 @@ use App\Models\Equipment\Part\DefenceModel; class DefenceService extends PartService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Defence'); } public function getModelClass(): DefenceModel diff --git a/app/Services/Equipment/Part/IpService.php b/app/Services/Equipment/Part/IpService.php index 0b8da74..3f3d37c 100644 --- a/app/Services/Equipment/Part/IpService.php +++ b/app/Services/Equipment/Part/IpService.php @@ -10,9 +10,9 @@ use App\Services\Equipment\Part\LineService; class IpService extends PartService { private ?LineService $_lineService = null; - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Ip'); } public function getModelClass(): IpModel @@ -46,7 +46,7 @@ class IpService extends PartService final public function getLineService(): LineService { if (!$this->_lineService) { - $this->_lineService = new LineService($this->request); + $this->_lineService = new LineService(); } return $this->_lineService; } diff --git a/app/Services/Equipment/Part/LineService.php b/app/Services/Equipment/Part/LineService.php index fb5063d..15486bc 100644 --- a/app/Services/Equipment/Part/LineService.php +++ b/app/Services/Equipment/Part/LineService.php @@ -7,9 +7,9 @@ use App\Models\Equipment\Part\LineModel; class LineService extends PartService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Line'); } public function getModelClass(): LineModel diff --git a/app/Services/Equipment/Part/PartService.php b/app/Services/Equipment/Part/PartService.php index db2a65c..1780653 100644 --- a/app/Services/Equipment/Part/PartService.php +++ b/app/Services/Equipment/Part/PartService.php @@ -6,9 +6,9 @@ use App\Services\Equipment\EquipmentService; abstract class PartService extends EquipmentService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Part'); } //FieldForm관련용 diff --git a/app/Services/Equipment/Part/RamService.php b/app/Services/Equipment/Part/RamService.php index 711c1d6..7019e69 100644 --- a/app/Services/Equipment/Part/RamService.php +++ b/app/Services/Equipment/Part/RamService.php @@ -7,9 +7,9 @@ use App\Models\Equipment\Part\RamModel; class RamService extends PartService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Ram'); } public function getModelClass(): RamModel diff --git a/app/Services/Equipment/Part/SoftwareService.php b/app/Services/Equipment/Part/SoftwareService.php index 02f04b3..13a8117 100644 --- a/app/Services/Equipment/Part/SoftwareService.php +++ b/app/Services/Equipment/Part/SoftwareService.php @@ -7,9 +7,9 @@ use App\Models\Equipment\Part\SoftwareModel; class SoftwareService extends PartService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Software'); } public function getModelClass(): SoftwareModel diff --git a/app/Services/Equipment/Part/StorageService.php b/app/Services/Equipment/Part/StorageService.php index d772945..578f458 100644 --- a/app/Services/Equipment/Part/StorageService.php +++ b/app/Services/Equipment/Part/StorageService.php @@ -7,9 +7,9 @@ use App\Models\Equipment\Part\StorageModel; class StorageService extends PartService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Storage'); } public function getModelClass(): StorageModel diff --git a/app/Services/Equipment/ServerService.php b/app/Services/Equipment/ServerService.php index a46d55c..895b96b 100644 --- a/app/Services/Equipment/ServerService.php +++ b/app/Services/Equipment/ServerService.php @@ -8,9 +8,9 @@ use App\Services\Equipment\EquipmentService; class ServerService extends EquipmentService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('Server'); } public function getModelClass(): ServerModel diff --git a/app/Services/MyLogService.php b/app/Services/MyLogService.php index ed6fedf..f51f12b 100644 --- a/app/Services/MyLogService.php +++ b/app/Services/MyLogService.php @@ -11,9 +11,9 @@ use App\Services\UserService; class MyLogService extends CommonService { private $_userService = null; - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('MyLog'); } public function getModelClass(): MyLogModel @@ -51,7 +51,7 @@ class MyLogService extends CommonService public function getUserService(): UserService { if (!$this->_userService) { - $this->_userService = new UserService($this->request); + $this->_userService = new UserService(); } return $this->_userService; } diff --git a/app/Services/UserSNSService.php b/app/Services/UserSNSService.php index ced98e1..af27ab3 100644 --- a/app/Services/UserSNSService.php +++ b/app/Services/UserSNSService.php @@ -8,9 +8,9 @@ use App\Entities\UserSNSEntity; class UserSNSService extends CommonService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request);; + parent::__construct();; $this->addClassName('UserSNS'); } public function getModelClass(): UserSNSModel diff --git a/app/Services/UserService.php b/app/Services/UserService.php index 97a76c5..b735a47 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -7,9 +7,9 @@ use App\Models\UserModel; class UserService extends CommonService { - public function __construct(mixed $request = null) + public function __construct() { - parent::__construct($request); + parent::__construct(); $this->addClassName('User'); } public function getModelClass(): UserModel