_datas[SESSION['NAMES']['ISLOGIN']] = false; $this->_datas['currentRoles'] = [DEFAULTS["ROLE"]]; if ($this->_session->get(SESSION['NAMES']['ISLOGIN'])) { $this->_datas[SESSION['NAMES']['ISLOGIN']] = true; $this->_datas['auth'] = $this->_session->get(SESSION['NAMES']['AUTH']); $currentRoles = explode(DEFAULTS['DELIMITER_ROLE'], $this->_datas['auth'][AUTH['FIELDS']['ROLE']]); $this->_datas['currentRoles'] = is_array($currentRoles) ? $currentRoles : [DEFAULTS["ROLE"]]; } } final public function __get($name): array|null { if (!array_key_exists($name, $this->_datas)) { return null; } return $this->_datas; } final public function __set($name, $value): void { $this->_datas[$name] = $value; } }