dbms_init...1

This commit is contained in:
최준흠 2025-06-06 14:21:18 +09:00
parent d97d9c9c44
commit 1c7426a479
2 changed files with 4 additions and 4 deletions

View File

@ -145,7 +145,7 @@ abstract class CommonModel extends Model
$entity->$field = htmlentities($formDatas[$field], ENT_QUOTES); $entity->$field = htmlentities($formDatas[$field], ENT_QUOTES);
break; break;
default: default:
if ($this->getFieldRule($action, $field) != "if_exist|numeric") { if ($this->getFormFieldRule($action, $field) != "if_exist|numeric") {
if (array_key_exists($field, $formDatas) && $formDatas[$field] !== '') { if (array_key_exists($field, $formDatas) && $formDatas[$field] !== '') {
$entity->$field = $formDatas[$field]; $entity->$field = $formDatas[$field];
} }
@ -180,7 +180,7 @@ abstract class CommonModel extends Model
final function create(array $formDatas, mixed $entity): mixed final function create(array $formDatas, mixed $entity): mixed
{ {
// Field에 맞는 Validation Rule 재정의 // Field에 맞는 Validation Rule 재정의
$this->setValidationRules($this->getFieldRules(__FUNCTION__, $this->allowedFields)); $this->setValidationRules($this->getFormFieldRules(__FUNCTION__, $this->allowedFields));
LogCollector::debug("입력내용"); LogCollector::debug("입력내용");
LogCollector::debug(var_export($formDatas, true)); LogCollector::debug(var_export($formDatas, true));
foreach (array_keys($formDatas) as $field) { foreach (array_keys($formDatas) as $field) {
@ -204,7 +204,7 @@ abstract class CommonModel extends Model
final function modify(mixed $entity, array $formDatas): mixed final function modify(mixed $entity, array $formDatas): mixed
{ {
// Field에 맞는 Validation Rule 재정의 // Field에 맞는 Validation Rule 재정의
$this->setValidationRules($this->getFieldRules(__FUNCTION__, $this->allowedFields)); $this->setValidationRules($this->getFormFieldRules(__FUNCTION__, $this->allowedFields));
// 저장하기 전에 데이터 값 변경이 필요한 Field // 저장하기 전에 데이터 값 변경이 필요한 Field
LogCollector::debug("[{$entity->getPK()}/{$entity->getTitle()}] 변경 전 내용"); LogCollector::debug("[{$entity->getPK()}/{$entity->getTitle()}] 변경 전 내용");
LogCollector::debug(var_export($formDatas, true)); LogCollector::debug(var_export($formDatas, true));

View File

@ -63,7 +63,7 @@ abstract class CommonService
$entity = is_array($where) ? $this->getModel()->where($where)->first() : $this->getModel()->find($where); $entity = is_array($where) ? $this->getModel()->where($where)->first() : $this->getModel()->find($where);
if (!$entity) { if (!$entity) {
if ($isThrow) { if ($isThrow) {
throw new \Exception(__FUNCTION__ . " => 해당 정보를 찾을수 없습니다."); throw new \Exception(__METHOD__ . "에서 해당 정보를 찾을수 없습니다.");
} }
} }
return $entity; return $entity;