Свойство | Type | Description | |
---|---|---|---|
$config | array | Configuration array | |
$error | Hybrid_Error | Error pool | |
$logger | Hybrid_Logger | Logger | |
$store | Hybrid_Storage | Auth cache | |
$version |
Méthode | Description | |
---|---|---|
__construct ( array $config ) | Try to start a new session of none then initialize Hybrid_Auth | |
authenticate ( string $providerId, array $params = null ) | Try to authenticate the user with a given provider. | |
getAdapter ( string $providerId = null ) : Hybrid_Provider_Adapter | Return the adapter instance for an authenticated provider | |
getConnectedProviders ( ) : array | Return array listing all authenticated providers | |
getCurrentUrl ( boolean $request_uri = true ) : string | Utility function, return the current url | |
getProviders ( ) : array | Return array listing all enabled providers as well as a flag if you are connected | |
getSessionData ( ) : string | null | Get hybridauth session data | |
initialize ( array $config ) : void | Try to initialize Hybrid_Auth with given $config hash or file | |
isConnectedWith ( string $providerId ) : boolean | Check if the current user is connected to a given provider | |
logoutAllProviders ( ) : void | A generic function to logout all connected provider at once | |
redirect ( string $url, string $mode = "PHP" ) | Utility function, redirect to a given URL with php header or using javascript location.href | |
restoreSessionData ( string $sessiondata = null ) | Restore hybridauth session data | |
setup ( string $providerId, array $params = null ) : Hybrid_Provider_Adapter | Setup an adapter for a given provider | |
storage ( ) : Hybrid_Storage | Hybrid storage system accessor |
public __construct ( array $config ) | ||
$config | array | Configuration array or path to a configratuion file |
public static authenticate ( string $providerId, array $params = null ) | ||
$providerId | string | ID of the provider |
$params | array | Params |
public static getAdapter ( string $providerId = null ) : Hybrid_Provider_Adapter | ||
$providerId | string | ID of the provider |
Résultat | Hybrid_Provider_Adapter |
public static getConnectedProviders ( ) : array | ||
Résultat | array |
public static getCurrentUrl ( boolean $request_uri = true ) : string | ||
$request_uri | boolean | true to get $_SERVER['REQUEST_URI'], false for $_SERVER['PHP_SELF'] |
Résultat | string |
array(
'Facebook' => array(
'connected' => true
)
)
public static getProviders ( ) : array | ||
Résultat | array |
public getSessionData ( ) : string | null | ||
Résultat | string | null |
public static initialize ( array $config ) : void | ||
$config | array | Configuration array or path to a configratuion file |
Résultat | void |
public static isConnectedWith ( string $providerId ) : boolean | ||
$providerId | string | ID of the provider |
Résultat | boolean |
public static logoutAllProviders ( ) : void | ||
Résultat | void |
public restoreSessionData ( string $sessiondata = null ) | ||
$sessiondata | string | Serialized session data |
public static storage ( ) : Hybrid_Storage | ||
Résultat | Hybrid_Storage |
public static Hybrid_Error $error | ||
Résultat | Hybrid_Error |
public static Hybrid_Logger $logger | ||
Résultat | Hybrid_Logger |
public static Hybrid_Storage $store | ||
Résultat | Hybrid_Storage |