PHP 클래스 yii\authclient\BaseClient

또한 보기: ClientInterface
부터: 2.0
저자: Paul Klimov ([email protected])
상속: extends yii\base\Component, implements yii\authclient\ClientInterface
파일 보기 프로젝트 열기: yiisoft/yii2-authclient 1 사용 예제들

공개 메소드들

메소드 설명
createRequest ( ) : Request Creates HTTP request instance.
getHttpClient ( ) : Client Returns HTTP client.
getId ( ) : string
getName ( ) : string
getNormalizeUserAttributeMap ( ) : array
getRequestOptions ( ) : array
getStateStorage ( ) : yii\authclient\StateStorageInterface
getTitle ( ) : string
getUserAttributes ( ) : array
getViewOptions ( ) : array
setHttpClient ( array | Client $httpClient ) Sets HTTP client to be used.
setId ( string $id )
setName ( string $name )
setNormalizeUserAttributeMap ( array $normalizeUserAttributeMap )
setRequestOptions ( array $options )
setStateStorage ( yii\authclient\StateStorageInterface | array | string $stateStorage )
setTitle ( string $title )
setUserAttributes ( array $userAttributes )
setViewOptions ( array $viewOptions )

보호된 메소드들

메소드 설명
createHttpClient ( string | array $reference ) : Client Creates HTTP client instance from reference or configuration.
defaultName ( ) : string Generates service name.
defaultNormalizeUserAttributeMap ( ) : array Returns the default [[normalizeUserAttributeMap]] value.
defaultRequestOptions ( ) : array Returns default HTTP request options.
defaultTitle ( ) : string Generates service title.
defaultViewOptions ( ) : array Returns the default [[viewOptions]] value.
getState ( string $key ) : mixed Returns persistent state value.
getStateKeyPrefix ( ) : string Returns session key prefix, which is used to store internal states.
initUserAttributes ( ) : array Initializes authenticated user attributes.
normalizeUserAttributes ( array $attributes ) : array Normalize given user attributes according to [[normalizeUserAttributeMap]].
removeState ( string $key ) : boolean Removes persistent state value.
setState ( string $key, mixed $value ) Sets persistent state.

메소드 상세

createHttpClient() 보호된 메소드

Creates HTTP client instance from reference or configuration.
부터: 2.1
protected createHttpClient ( string | array $reference ) : Client
$reference string | array component name or array configuration.
리턴 yii\httpclient\Client HTTP client instance.

createRequest() 공개 메소드

Creates HTTP request instance.
부터: 2.1
public createRequest ( ) : Request
리턴 yii\httpclient\Request HTTP request instance.

defaultName() 보호된 메소드

Generates service name.
protected defaultName ( ) : string
리턴 string service name.

defaultNormalizeUserAttributeMap() 보호된 메소드

Particular client may override this method in order to provide specific default map.
protected defaultNormalizeUserAttributeMap ( ) : array
리턴 array normalize attribute map.

defaultRequestOptions() 보호된 메소드

Returns default HTTP request options.
부터: 2.1
protected defaultRequestOptions ( ) : array
리턴 array HTTP request options.

defaultTitle() 보호된 메소드

Generates service title.
protected defaultTitle ( ) : string
리턴 string service title.

defaultViewOptions() 보호된 메소드

Particular client may override this method in order to provide specific default view options.
protected defaultViewOptions ( ) : array
리턴 array list of default [[viewOptions]]

getHttpClient() 공개 메소드

Returns HTTP client.
부터: 2.1
public getHttpClient ( ) : Client
리턴 yii\httpclient\Client internal HTTP client.

getId() 공개 메소드

public getId ( ) : string
리턴 string service id

getName() 공개 메소드

public getName ( ) : string
리턴 string service name.

getNormalizeUserAttributeMap() 공개 메소드

public getNormalizeUserAttributeMap ( ) : array
리턴 array normalize user attribute map.

getRequestOptions() 공개 메소드

부터: 2.1
public getRequestOptions ( ) : array
리턴 array HTTP request options.

getState() 보호된 메소드

Returns persistent state value.
protected getState ( string $key ) : mixed
$key string state key.
리턴 mixed state value.

getStateKeyPrefix() 보호된 메소드

Returns session key prefix, which is used to store internal states.
protected getStateKeyPrefix ( ) : string
리턴 string session key prefix.

getStateStorage() 공개 메소드

public getStateStorage ( ) : yii\authclient\StateStorageInterface
리턴 yii\authclient\StateStorageInterface stage storage.

getTitle() 공개 메소드

public getTitle ( ) : string
리턴 string service title.

getUserAttributes() 공개 메소드

public getUserAttributes ( ) : array
리턴 array list of user attributes

getViewOptions() 공개 메소드

public getViewOptions ( ) : array
리턴 array view options in format: optionName => optionValue

initUserAttributes() 추상적인 보호된 메소드

Initializes authenticated user attributes.
abstract protected initUserAttributes ( ) : array
리턴 array auth user attributes.

normalizeUserAttributes() 보호된 메소드

Normalize given user attributes according to [[normalizeUserAttributeMap]].
protected normalizeUserAttributes ( array $attributes ) : array
$attributes array raw attributes.
리턴 array normalized attributes.

removeState() 보호된 메소드

Removes persistent state value.
protected removeState ( string $key ) : boolean
$key string state key.
리턴 boolean success.

setHttpClient() 공개 메소드

Sets HTTP client to be used.
부터: 2.1
public setHttpClient ( array | Client $httpClient )
$httpClient array | yii\httpclient\Client internal HTTP client.

setId() 공개 메소드

public setId ( string $id )
$id string service id.

setName() 공개 메소드

public setName ( string $name )
$name string service name.

setNormalizeUserAttributeMap() 공개 메소드

public setNormalizeUserAttributeMap ( array $normalizeUserAttributeMap )
$normalizeUserAttributeMap array normalize user attribute map.

setRequestOptions() 공개 메소드

부터: 2.1
public setRequestOptions ( array $options )
$options array HTTP request options.

setState() 보호된 메소드

Sets persistent state.
protected setState ( string $key, mixed $value )
$key string state key.
$value mixed state value

setStateStorage() 공개 메소드

public setStateStorage ( yii\authclient\StateStorageInterface | array | string $stateStorage )
$stateStorage yii\authclient\StateStorageInterface | array | string stage storage to be used.

setTitle() 공개 메소드

public setTitle ( string $title )
$title string service title.

setUserAttributes() 공개 메소드

public setUserAttributes ( array $userAttributes )
$userAttributes array list of user attributes

setViewOptions() 공개 메소드

public setViewOptions ( array $viewOptions )
$viewOptions array view options in format: optionName => optionValue