class OAuthSession in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.7 lib/oauth-php/library/OAuthSession.php \OAuthSession
- 7.2 lib/oauth-php/library/OAuthSession.php \OAuthSession
- 7.3 lib/oauth-php/library/OAuthSession.php \OAuthSession
- 7.4 lib/oauth-php/library/OAuthSession.php \OAuthSession
- 7.6 lib/oauth-php/library/OAuthSession.php \OAuthSession
Hierarchy
- class \OAuthSession
Expanded class hierarchy of OAuthSession
1 string reference to 'OAuthSession'
- OAuthSession::instance in lib/
oauth-php/ library/ OAuthSession.php - * Request an instance of the OAuthSession
File
- lib/
oauth-php/ library/ OAuthSession.php, line 37
View source
class OAuthSession {
private static $instance = false;
/**
* Request an instance of the OAuthSession
*/
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
OAuthSession:: |
private static | property | ||
OAuthSession:: |
public static | function | * Request an instance of the OAuthSession |