static public function session($name=null)
	{
	    $id = 'session';
	    if (!static::has($id)) {
	        static::setShared($id, function () {
	            // app option
	            $options = Config::get('session');
	            
	            if ($options['storage'] == 'file') {
	                if (!isset($options['save_path']) && isset($options['path'])) {
	                    $options['save_path'] = $options['path'];
	                }
	                $options['save_path'] = isset($options['save_path']) ? ltrim($options['save_path'], '/') : 'sessions';
	                $options['save_path'] = Config::getStoragePath() . $options['save_path'];
	            }
	            $obj = new Session($options);
	            $obj->start();
	            return $obj;
	        });
	    }
	    
	    return static::get($id);
	}
static public function session($name=null)
	{
	    $id = 'session';
	    if (!static::has($id)) {
	        static::setShared($id, function () {
	            // app option
	            $options = Config::get('session');
	            
	            if ($options['storage'] == 'file') {
	                if (!isset($options['save_path']) && isset($options['path'])) {
	                    $options['save_path'] = $options['path'];
	                }
	                $options['save_path'] = isset($options['save_path']) ? ltrim($options['save_path'], '/') : 'sessions';
	                $options['save_path'] = Config::getStoragePath() . $options['save_path'];
	            }
	            $obj = new Session($options);
	            $obj->start();
	            return $obj;
	        });
	    }
	    
	    return static::get($id);
	}
static public function session ( $ name = null ) { $ id = 'session' ; if ( ! static :: has ( $ id ) ) { static :: setShared ( $ id , function ( ) { // app option $ options = Config :: get ( 'session' ) ; if ( $ options [ 'storage' ] == 'file' ) { if ( ! isset ( $ options [ 'save_path' ] ) && isset ( $ options [ 'path' ] ) ) { $ options [ 'save_path' ] = $ options [ 'path' ] ; } $ options [ 'save_path' ] = isset ( $ options [ 'save_path' ] ) ? ltrim ( $ options [ 'save_path' ] , '/' ) : 'sessions' ; $ options [ 'save_path' ] = Config :: getStoragePath ( ) . $ options [ 'save_path' ] ; } $ obj = new Session ( $ options ) ; $ obj -> start ( ) ; return $ obj ; } ) ; } return static :: get ( $ id ) ; }
get session instance
@return \Wslim\Session\Session
get session instance