diff --git a/app/Entities/CommonEntity.php b/app/Entities/CommonEntity.php index 4a452d1..8327935 100644 --- a/app/Entities/CommonEntity.php +++ b/app/Entities/CommonEntity.php @@ -34,9 +34,9 @@ abstract class CommonEntity extends Entity |-------------------------------------------------------------------------- */ - public function __get(string $key) + final public function __get(string $key) { - return parent::__get($key); + return $this->attributes[$key] ?? null; } /* @@ -45,7 +45,7 @@ abstract class CommonEntity extends Entity |-------------------------------------------------------------------------- */ - public function __set(string $key, $value = null) + final public function __set(string $key, $value = null) { // 1️⃣ 문자열 trim if (is_string($value)) { @@ -67,7 +67,7 @@ abstract class CommonEntity extends Entity // } // ✅ 반드시 부모 __set 호출 - parent::__set($key, $value); + $this->attributes[$key] = $value; } /* diff --git a/app/Libraries/AuthContext.php b/app/Libraries/AuthContext.php index 680bd0e..ffeb91b 100644 --- a/app/Libraries/AuthContext.php +++ b/app/Libraries/AuthContext.php @@ -104,7 +104,7 @@ class AuthContext { $this->session->set(self::SESSION_IS_LOGIN, true); $this->session->set(self::SESSION_AUTH_INFO, [ - 'uid' => (int) $entity->getPK(), + 'uid' => $entity->getPK(), 'id' => $entity->getID(), 'name' => $entity->getTitle(), 'role' => $entity->getRole()