PHP Class Hybrid_Provider_Adapter

Basically Hybrid_Provider_Adapter will create a bridge from your php application to the provider api. Hybrid_Auth will automatically load Hybrid_Provider_Adapter and create an instance of it for each authenticated provider.
Afficher le fichier Open project: hybridauth/hybridauth Class Usage Examples

Méthodes publiques

Свойство Type Description
$adapter Hybrid_Provider_Model Provider adapter instance
$config array Provider adapter specific config
$id mixed Provider ID (or unique name)
$params array Provider adapter extra parameters
$wrapper string Provider adapter wrapper path

Méthodes publiques

Méthode Description
__call ( string $name, array $arguments ) : mixed Call adapter methods defined in the adapter model: getUserProfile() getUserContacts() getUserActivity() setUserStatus()
api ( ) : stdClass Naive getter of the current connected IDp API client
factory ( string $id, array $params = [] ) : Hybrid_Provider_Adapter Create a new adapter switch IDp name or ID
getAccessToken ( ) : array If the user is connected, then return the access_token and access_token_secret if the provider api use oauth
getConfigById ( string $id ) : mixed Return the provider config by id
getProviderCiId ( string $id ) : mixed Return the provider config by id; case insensitive
isUserConnected ( ) : boolean Return true if the user is connected to the current provider
login ( ) : void Hybrid_Provider_Adapter::login(), prepare the user session and the authentication request for index.php
logout ( ) : boolean Let hybridauth forget all about the user for the current provider
returnToCallbackUrl ( ) : void Redirect the user to hauth_return_to (the callback url)

Method Details

__call() public méthode

Call adapter methods defined in the adapter model: getUserProfile() getUserContacts() getUserActivity() setUserStatus()
public __call ( string $name, array $arguments ) : mixed
$name string Method name
$arguments array Call arguments
Résultat mixed

api() public méthode

Naive getter of the current connected IDp API client
public api ( ) : stdClass
Résultat stdClass

factory() public méthode

Create a new adapter switch IDp name or ID
public factory ( string $id, array $params = [] ) : Hybrid_Provider_Adapter
$id string The id or name of the IDp
$params array (optional) required parameters by the adapter
Résultat Hybrid_Provider_Adapter

getAccessToken() public méthode

array( 'access_token' => '', 'access_token_secret' => '', 'refresh_token' => '', 'expires_in' => '', 'expires_at' => '', )
public getAccessToken ( ) : array
Résultat array

getConfigById() public méthode

Return the provider config by id
public getConfigById ( string $id ) : mixed
$id string Config key
Résultat mixed

getProviderCiId() public méthode

Return the provider config by id; case insensitive
public getProviderCiId ( string $id ) : mixed
$id string Provider id
Résultat mixed

isUserConnected() public méthode

Return true if the user is connected to the current provider
public isUserConnected ( ) : boolean
Résultat boolean

login() public méthode

Hybrid_Provider_Adapter::login(), prepare the user session and the authentication request for index.php
public login ( ) : void
Résultat void

logout() public méthode

Let hybridauth forget all about the user for the current provider
public logout ( ) : boolean
Résultat boolean

returnToCallbackUrl() public méthode

Redirect the user to hauth_return_to (the callback url)
public returnToCallbackUrl ( ) : void
Résultat void

Property Details

$adapter public_oe property

Provider adapter instance
public Hybrid_Provider_Model $adapter
Résultat Hybrid_Provider_Model

$config public_oe property

Provider adapter specific config
public array $config
Résultat array

$id public_oe property

Provider ID (or unique name)
public mixed $id
Résultat mixed

$params public_oe property

Provider adapter extra parameters
public array $params
Résultat array

$wrapper public_oe property

Provider adapter wrapper path
public string $wrapper
Résultat string