class OAuthStore in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lib/oauth-php/library/OAuthStore.php \OAuthStore
- 7.2 lib/oauth-php/library/OAuthStore.php \OAuthStore
- 7.3 lib/oauth-php/library/OAuthStore.php \OAuthStore
- 7.4 lib/oauth-php/library/OAuthStore.php \OAuthStore
- 7.5 lib/oauth-php/library/OAuthStore.php \OAuthStore
Hierarchy
- class \OAuthStore
Expanded class hierarchy of OAuthStore
1 string reference to 'OAuthStore'
- OAuthStore::instance in lib/
oauth-php/ library/ OAuthStore.php - * Request an instance of the OAuthStore
File
- lib/
oauth-php/ library/ OAuthStore.php, line 37
View source
class OAuthStore {
private static $instance = false;
/**
* Request an instance of the OAuthStore
*/
public static function instance($store = 'MySQL', $options = array()) {
if (!OAuthStore::$instance) {
// Select the store you want to use
if (strpos($store, '/') === false) {
$class = 'OAuthStore' . $store;
$file = dirname(__FILE__) . '/store/' . $class . '.php';
}
else {
$file = $store;
$store = basename($file, '.php');
$class = $store;
}
if (is_file($file)) {
require_once $file;
if (class_exists($class)) {
OAuthStore::$instance = new $class($options);
}
else {
throw new OAuthException2('Could not find class ' . $class . ' in file ' . $file);
}
}
else {
throw new OAuthException2('No OAuthStore for ' . $store . ' (file ' . $file . ')');
}
}
return OAuthStore::$instance;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
OAuthStore:: |
private static | property | ||
OAuthStore:: |
public static | function | * Request an instance of the OAuthStore |