<?php

namespace App\Controllers\Admin;

use App\Controllers\CommonController;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
use App\Services\Customer\ServiceService;

abstract class AdminController extends CommonController
{
    private ?ServiceService $_serviceService = null;
    public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
    {
        parent::initController($request, $response, $logger);
        $this->layout = "admin";
        $this->uri_path = "admin/";
        $this->view_path = "admin" . DIRECTORY_SEPARATOR;
        $this->content_title     = "관리자";
        $this->helper = $this->getHelper();
    }
    //Service,ServicePaymentController사용
    final public function getServiceService(): ServiceService
    {
        if (!$this->_serviceService) {
            $this->_serviceService = new ServiceService();
        }
        return $this->_serviceService;
    }
}
