<?php

namespace App\Controllers\Admin;

use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;

use App\Traits\AuthTrait;
use App\Controllers\CommonController;
use App\Models\UserModel;

class UserController extends CommonController
{
    use AuthTrait;
    private $_model = null;
    public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
    {
        parent::initController($request, $response, $logger);
        $this->session = $this->loginCheck_AuthTrait();
    }
    private function getModel(): UserModel
    {
        if ($this->_model === null) {
            $this->_model = new UserModel();
        }
        return $this->_model;
    }
}
