dbms_primeidc/extdbms/lib/Controllers/DBMS/DefenceController.php
2025-04-17 19:09:50 +09:00

38 lines
1.1 KiB
PHP

<?php
namespace lib\Controllers\DBMS;
use lib\Services\DefenceService;
class DefenceController extends DBMSController
{
private ?DefenceService $_clientService = null;
public function __construct(array $params = [])
{
parent::__construct($params);
$this->getView()->setPath('defence');
} //
public function getDefenceService(): DefenceService
{
if ($this->_clientService === null) {
$this->_clientService = new DefenceService();
}
return $this->_clientService;
}
//방어 defense_index.php
//CLI 접속방법 : php index.php site/defence/mk/zone/존/parent/부모키/child/자식키
//WEB 접속방법 : http://localhostsite/defence/mk/zone/존/parent/부모키/child/자식키
public function mk(): string
{
$zone = $this->request->get('zone');
if (!$zone) {
throw new \Exception("zone 값이 정의되지 않았습니다.");
}
$zone = urldecode($zone);
$this->entities = $this->getDefenceService()->getMKList($zone);
$this->zone = $zone;
return $this->render(__FUNCTION__);
}
} //Class