dbmsv4 init...5
This commit is contained in:
parent
a79a9635f3
commit
8cab3c4e94
@ -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
|
// 1️⃣ 문자열 trim
|
||||||
if (is_string($value)) {
|
if (is_string($value)) {
|
||||||
@ -67,7 +67,7 @@ abstract class CommonEntity extends Entity
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// ✅ 반드시 부모 __set 호출
|
// ✅ 반드시 부모 __set 호출
|
||||||
parent::__set($key, $value);
|
$this->attributes[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -104,7 +104,7 @@ class AuthContext
|
|||||||
{
|
{
|
||||||
$this->session->set(self::SESSION_IS_LOGIN, true);
|
$this->session->set(self::SESSION_IS_LOGIN, true);
|
||||||
$this->session->set(self::SESSION_AUTH_INFO, [
|
$this->session->set(self::SESSION_AUTH_INFO, [
|
||||||
'uid' => (int) $entity->getPK(),
|
'uid' => $entity->getPK(),
|
||||||
'id' => $entity->getID(),
|
'id' => $entity->getID(),
|
||||||
'name' => $entity->getTitle(),
|
'name' => $entity->getTitle(),
|
||||||
'role' => $entity->getRole()
|
'role' => $entity->getRole()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user