CI_Session::__get PHP Method

__get() public method

__get()
public __get ( string $key ) : mixed
$key string 'session_id' or a session data key
return mixed
    public function __get($key)
    {
        // Note: Keep this order the same, just in case somebody wants to
        //       use 'session_id' as a session data key, for whatever reason
        if (isset($_SESSION[$key])) {
            return $_SESSION[$key];
        } elseif ($key === 'session_id') {
            return session_id();
        }
        return NULL;
    }