public static function instance ( $store = 'SESSION', $options = array() )
	{
	    if (!OAuthSession::$instance)
	    {
			// Select the store you want to use
			if (strpos($store, '/') === false)
			{
				$class = 'OAuthSession'.$store;
				$file  = dirname(__FILE__) . '/session/'.$class.'.php';
			}
			else
			{
				$file  = $store;
				$store = basename($file, '.php');
				$class = $store;
			}

			if (is_file($file))
			{
				require_once $file;
				
				if (class_exists($class))
				{
					OAuthSession::$instance = new $class($options);
				}
				else
				{
					throw new OAuthException2('Could not find class '.$class.' in file '.$file);
				}
			}
			else
			{
				throw new OAuthException2('No OAuthSession for '.$store.' (file '.$file.')');
			}
	    }
	    return OAuthSession::$instance;	
	}
public static function instance ( $store = 'SESSION', $options = array() )
	{
	    if (!OAuthSession::$instance)
	    {
			// Select the store you want to use
			if (strpos($store, '/') === false)
			{
				$class = 'OAuthSession'.$store;
				$file  = dirname(__FILE__) . '/session/'.$class.'.php';
			}
			else
			{
				$file  = $store;
				$store = basename($file, '.php');
				$class = $store;
			}

			if (is_file($file))
			{
				require_once $file;
				
				if (class_exists($class))
				{
					OAuthSession::$instance = new $class($options);
				}
				else
				{
					throw new OAuthException2('Could not find class '.$class.' in file '.$file);
				}
			}
			else
			{
				throw new OAuthException2('No OAuthSession for '.$store.' (file '.$file.')');
			}
	    }
	    return OAuthSession::$instance;	
	}
public static function instance ( $ store = 'SESSION' , $ options = array ( ) ) { if ( ! OAuthSession :: $ instance ) { // Select the store you want to use if ( strpos ( $ store , '/' ) === false ) { $ class = 'OAuthSession' . $ store ; $ file = dirname ( __FILE__ ) . '/session/' . $ class . '.php' ; } else { $ file = $ store ; $ store = basename ( $ file , '.php' ) ; $ class = $ store ; } if ( is_file ( $ file ) ) { require_once $ file ; if ( class_exists ( $ class ) ) { OAuthSession :: $ instance = new $ class ( $ options ) ; } else { throw new OAuthException2 ( 'Could not find class ' . $ class . ' in file ' . $ file ) ; } } else { throw new OAuthException2 ( 'No OAuthSession for ' . $ store . ' (file ' . $ file . ')' ) ; } } return OAuthSession :: $ instance ; }
Request an instance of the OAuthSession
Request an instance of the OAuthSession