dbms_primeidc/extdbms/lib/Controllers/DBMS/ServerController.php
2025-04-07 19:02:25 +09:00

37 lines
1.1 KiB
PHP

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