Abstract Class yii\authclient\BaseClient

Inheritanceyii\authclient\BaseClient » yii\base\Component » yii\base\Object
Implementsyii\authclient\ClientInterface, yii\base\Configurable
Subclassesyii\authclient\BaseOAuth, yii\authclient\OAuth1, yii\authclient\OAuth2, yii\authclient\OpenId, yii\authclient\clients\Facebook, yii\authclient\clients\GitHub, yii\authclient\clients\GoogleHybrid, yii\authclient\clients\GoogleOAuth, yii\authclient\clients\GoogleOpenId, yii\authclient\clients\LinkedIn, yii\authclient\clients\Live, yii\authclient\clients\Twitter, yii\authclient\clients\VKontakte, yii\authclient\clients\YandexOAuth, yii\authclient\clients\YandexOpenId
Available since version2.0
Source Code https://github.com/yiisoft/yii2-authclient/blob/master/BaseClient.php

BaseClient is a base Auth Client class.

See also yii\authclient\ClientInterface.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$behaviors yii\base\Behavior[] List of behaviors attached to this component yii\base\Component
$id string Service id. yii\authclient\BaseClient
$name string Service name. yii\authclient\BaseClient
$normalizeUserAttributeMap array Normalize user attribute map. yii\authclient\BaseClient
$title string Service title. yii\authclient\BaseClient
$userAttributes array List of user attributes yii\authclient\BaseClient
$viewOptions array View options in format: optionName => optionValue yii\authclient\BaseClient

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\Component
__clone() This method is called after the object is created by cloning an existing one. yii\base\Component
__construct() Constructor. yii\base\Object
__get() Returns the value of a component property. yii\base\Component
__isset() Checks if a property is set, i.e. defined and not null. yii\base\Component
__set() Sets the value of a component property. yii\base\Component
__unset() Sets a component property to be null. yii\base\Component
attachBehavior() Attaches a behavior to this component. yii\base\Component
attachBehaviors() Attaches a list of behaviors to the component. yii\base\Component
behaviors() Returns a list of behaviors that this component should behave as. yii\base\Component
canGetProperty() Returns a value indicating whether a property can be read. yii\base\Component
canSetProperty() Returns a value indicating whether a property can be set. yii\base\Component
className() Returns the fully qualified name of this class. yii\base\Object
detachBehavior() Detaches a behavior from the component. yii\base\Component
detachBehaviors() Detaches all behaviors from the component. yii\base\Component
ensureBehaviors() Makes sure that the behaviors declared in behaviors() are attached to this component. yii\base\Component
getBehavior() Returns the named behavior object. yii\base\Component
getBehaviors() Returns all behaviors attached to this component. yii\base\Component
getId() yii\authclient\BaseClient
getName() yii\authclient\BaseClient
getNormalizeUserAttributeMap() yii\authclient\BaseClient
getTitle() yii\authclient\BaseClient
getUserAttributes() yii\authclient\BaseClient
getViewOptions() yii\authclient\BaseClient
hasEventHandlers() Returns a value indicating whether there is any handler attached to the named event. yii\base\Component
hasMethod() Returns a value indicating whether a method is defined. yii\base\Component
hasProperty() Returns a value indicating whether a property is defined for this component. yii\base\Component
init() Initializes the object. yii\base\Object
off() Detaches an existing event handler from this component. yii\base\Component
on() Attaches an event handler to an event. yii\base\Component
setId() yii\authclient\BaseClient
setName() yii\authclient\BaseClient
setNormalizeUserAttributeMap() yii\authclient\BaseClient
setTitle() yii\authclient\BaseClient
setUserAttributes() yii\authclient\BaseClient
setViewOptions() yii\authclient\BaseClient
trigger() Triggers an event. yii\base\Component

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
defaultName() Generates service name. yii\authclient\BaseClient
defaultNormalizeUserAttributeMap() Returns the default $normalizeUserAttributeMap value. yii\authclient\BaseClient
defaultTitle() Generates service title. yii\authclient\BaseClient
defaultViewOptions() Returns the default $viewOptions value. yii\authclient\BaseClient
initUserAttributes() Initializes authenticated user attributes. yii\authclient\BaseClient
normalizeUserAttributes() Normalize given user attributes according to $normalizeUserAttributeMap. yii\authclient\BaseClient

Property Details

$id public property
string getId( )
void setId$id )

Service id.

$name public property
string getName( )
void setName$name )

Service name.

$normalizeUserAttributeMap public property
array getNormalizeUserAttributeMap( )
void setNormalizeUserAttributeMap$normalizeUserAttributeMap )

Normalize user attribute map.

$title public property
string getTitle( )
void setTitle$title )

Service title.

$userAttributes public property
array getUserAttributes( )
void setUserAttributes$userAttributes )

List of user attributes

$viewOptions public property
array getViewOptions( )
void setViewOptions$viewOptions )

View options in format: optionName => optionValue

Method Details

defaultName() protected method

Generates service name.

string defaultName( )
return string

Service name.

defaultNormalizeUserAttributeMap() protected method

Returns the default $normalizeUserAttributeMap value.

Particular client may override this method in order to provide specific default map.

array defaultNormalizeUserAttributeMap( )
return array

Normalize attribute map.

defaultTitle() protected method

Generates service title.

string defaultTitle( )
return string

Service title.

defaultViewOptions() protected method

Returns the default $viewOptions value.

Particular client may override this method in order to provide specific default view options.

array defaultViewOptions( )
return array

List of default $viewOptions

getId() public method

string getId( )
return string

Service id

getName() public method

string getName( )
return string

Service name.

getNormalizeUserAttributeMap() public method

array getNormalizeUserAttributeMap( )
return array

Normalize user attribute map.

getTitle() public method

string getTitle( )
return string

Service title.

getUserAttributes() public method

array getUserAttributes( )
return array

List of user attributes

getViewOptions() public method

array getViewOptions( )
return array

View options in format: optionName => optionValue

initUserAttributes() protected method

Initializes authenticated user attributes.

array initUserAttributes( )
return array

Auth user attributes.

normalizeUserAttributes() protected method

Normalize given user attributes according to $normalizeUserAttributeMap.

array normalizeUserAttributes$attributes )
$attributes array

Raw attributes.

return array

Normalized attributes.

throws yii\base\InvalidConfigException

on incorrect normalize attribute map.

setId() public method

void setId$id )
$id string

Service id.

setName() public method

void setName$name )
$name string

Service name.

setNormalizeUserAttributeMap() public method

void setNormalizeUserAttributeMap$normalizeUserAttributeMap )
$normalizeUserAttributeMap array

Normalize user attribute map.

setTitle() public method

void setTitle$title )
$title string

Service title.

setUserAttributes() public method

void setUserAttributes$userAttributes )
$userAttributes array

List of user attributes

setViewOptions() public method

void setViewOptions$viewOptions )
$viewOptions array

View options in format: optionName => optionValue