PHP 클래스 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.
파일 보기 프로젝트 열기: hybridauth/hybridauth 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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

공개 메소드들

메소드 설명
__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)

메소드 상세

__call() 공개 메소드

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
리턴 mixed

api() 공개 메소드

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

factory() 공개 메소드

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
리턴 Hybrid_Provider_Adapter

getAccessToken() 공개 메소드

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

getConfigById() 공개 메소드

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

getProviderCiId() 공개 메소드

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

isUserConnected() 공개 메소드

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

login() 공개 메소드

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

logout() 공개 메소드

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

returnToCallbackUrl() 공개 메소드

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

프로퍼티 상세

$adapter 공개적으로 프로퍼티

Provider adapter instance
public Hybrid_Provider_Model $adapter
리턴 Hybrid_Provider_Model

$config 공개적으로 프로퍼티

Provider adapter specific config
public array $config
리턴 array

$id 공개적으로 프로퍼티

Provider ID (or unique name)
public mixed $id
리턴 mixed

$params 공개적으로 프로퍼티

Provider adapter extra parameters
public array $params
리턴 array

$wrapper 공개적으로 프로퍼티

Provider adapter wrapper path
public string $wrapper
리턴 string