Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Protected Member Functions | List of all members
CustomMailruService Class Reference
Inheritance diagram for CustomMailruService:
MailruOAuthService EOAuth2Service EAuthServiceBase IAuthService IAuthService

Protected Member Functions

 fetchAttributes ()
- Protected Member Functions inherited from MailruOAuthService
 getCodeUrl ($redirect_uri)
 getTokenUrl ($code)
 getAccessToken ($code)
 saveAccessToken ($token)
 restoreAccessToken ()
 fetchJsonError ($json)

Additional Inherited Members

- Public Member Functions inherited from MailruOAuthService
 makeSignedRequest ($url, $options=array(), $parseJson=true)
- Protected Attributes inherited from MailruOAuthService
 $name = 'mailru'
 $title = 'Mail.ru'
 $type = 'OAuth'
 $jsArguments = array('popup' => array('width' => 580, 'height' => 400))
 $client_id = ''
 $client_secret = ''
 $scope = ''
 $providerOptions
 $uid = null

Detailed Description

An example of extending the provider class.

Author
ChooJoy chooj.nosp@m.oy.w.nosp@m.ork@g.nosp@m.mail.nosp@m..com http://www.opensource.org/licenses/bsd-license.php

Definition at line 12 of file CustomMailruService.php.

Member Function Documentation

CustomMailruService::fetchAttributes ( )
protected

Fetch attributes array.

Returns
boolean whether the attributes was successfully fetched.

Reimplemented from MailruOAuthService.

Definition at line 14 of file CustomMailruService.php.

References MailruOAuthService\makeSignedRequest().

{
$info = (array)$this->makeSignedRequest('http://www.appsmail.ru/platform/api', array(
'query' => array(
'uids' => $this->uid,
'method' => 'users.getInfo',
'app_id' => $this->client_id,
),
));
$info = $info[0];
$this->attributes['id'] = $info->uid;
$this->attributes['first_name'] = $info->first_name;
$this->attributes['photo'] = $info->pic;
}

The documentation for this class was generated from the following file: