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.
Datei anzeigen Open project: hybridauth/hybridauth Class Usage Examples

Public Properties

Property 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

Public Methods

Method 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 method

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
return mixed

api() public method

Naive getter of the current connected IDp API client
public api ( ) : stdClass
return stdClass

factory() public method

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
return Hybrid_Provider_Adapter

getAccessToken() public method

array( 'access_token' => '', 'access_token_secret' => '', 'refresh_token' => '', 'expires_in' => '', 'expires_at' => '', )
public getAccessToken ( ) : array
return array

getConfigById() public method

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

getProviderCiId() public method

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

isUserConnected() public method

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

login() public method

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

logout() public method

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

returnToCallbackUrl() public method

Redirect the user to hauth_return_to (the callback url)
public returnToCallbackUrl ( ) : void
return void

Property Details

$adapter public_oe property

Provider adapter instance
public Hybrid_Provider_Model $adapter
return Hybrid_Provider_Model

$config public_oe property

Provider adapter specific config
public array $config
return array

$id public_oe property

Provider ID (or unique name)
public mixed $id
return mixed

$params public_oe property

Provider adapter extra parameters
public array $params
return array

$wrapper public_oe property

Provider adapter wrapper path
public string $wrapper
return string