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

45 lines
1.6 KiB
PHP

<?php
namespace lib\Controllers\DBMS\Client;
use lib\Helpers\ServiceHelper;
class MemoController extends ClientController
{
public function __construct(array $params = [])
{
parent::__construct($params);
$this->getView()->setPath('memo');
$this->helper = new ServiceHelper();
} //
//사용자용메모장 , customer_memo.php
//CLI 접속방법 : php index.php site/client/memo/update_form/client_code/코드번호
//WEB 접속방법 : http://localhost/site/client/memo/update_form/client_code/코드번호
public function update_form()
{
$client_code = $this->request->get('client_code');
if (!$client_code) {
throw new \Exception("client_code 값이 정의되지 않았습니다.");
}
$entity = $this->getClientService()->getEntityByCode($client_code);
if (!$entity) {
throw new \Exception("[$client_code]에 해당하는 사용자정보가 존재하지 않습니다.");
}
$this->entity = $entity;
return $this->render(__FUNCTION__);
}
public function update()
{
$client_code = $this->request->get('client_code');
if (!$client_code) {
throw new \Exception("client_code 값이 정의되지 않았습니다.");
}
$entity = $this->getClientService()->getEntityByCode($client_code);
if (!$entity) {
throw new \Exception("[$client_code]에 해당하는 사용자정보가 존재하지 않습니다.");
}
return $this->render(__FUNCTION__);
}
} //Class