src/Core/LTIX.php
public static function wrapped_session_get($session_object,$key,$default=null)
    {
        global $TSUGI_SESSION_OBJECT;
        if ( $session_object === null && isset($TSUGI_SESSION_OBJECT) ) $session_object = $TSUGI_SESSION_OBJECT;
        if ( is_object($session_object) ) {
            return $session_object->get($key,$default);
        }
        if ( is_array($session_object) ) {
            if ( isset($session_object[$key]) ) return $session_object[$key];
            return $default;
        }
        if ( ! isset($_SESSION) ) return $default;
        if ( ! isset($_SESSION[$key]) ) return $default;
        return $_SESSION[$key];
    }
public static function wrapped_session_get($session_object,$key,$default=null)
    {
        global $TSUGI_SESSION_OBJECT;
        if ( $session_object === null && isset($TSUGI_SESSION_OBJECT) ) $session_object = $TSUGI_SESSION_OBJECT;
        if ( is_object($session_object) ) {
            return $session_object->get($key,$default);
        }
        if ( is_array($session_object) ) {
            if ( isset($session_object[$key]) ) return $session_object[$key];
            return $default;
        }
        if ( ! isset($_SESSION) ) return $default;
        if ( ! isset($_SESSION[$key]) ) return $default;
        return $_SESSION[$key];
    }
public static function wrapped_session_get ( $ session_object , $ key , $ default = null ) { global $ TSUGI_SESSION_OBJECT ; if ( $ session_object === null && isset ( $ TSUGI_SESSION_OBJECT ) ) $ session_object = $ TSUGI_SESSION_OBJECT ; if ( is_object ( $ session_object ) ) { return $ session_object -> get ( $ key , $ default ) ; } if ( is_array ( $ session_object ) ) { if ( isset ( $ session_object [ $ key ] ) ) return $ session_object [ $ key ] ; return $ default ; } if ( ! isset ( $ _SESSION ) ) return $ default ; if ( ! isset ( $ _SESSION [ $ key ] ) ) return $ default ; return $ _SESSION [ $ key ] ; }
Wrap getting a key from the session
Wrap getting a key from the session