我有以下对象
[yii\authclient\clients\Twitter_ef71f520786335688cd762d29aaa2ac98b6bd42f_token] => yii\authclient\OAuthToken Object
(
[tokenParamKey] => oauth_token
[tokenSecretParamKey] => oauth_token_secret
[createTimestamp] => 1447473086
[_expireDurationParamKey:yii\authclient\OAuthToken:private] =>
[_params:yii\authclient\OAuthToken:private] => Array
(
[oauth_token] => 48575497-RTIItaMJBC5LrFl0I2TjYw0ihByC0QuRdRxf44tVX
[oauth_token_secret] => IcdvTgwiclWGNhX4TrsDjEkEdNwVF7l1XzXmgpNstGfkV
[user_id] => **********
[screen_name] => ***********
[x_auth_expires] => 0
)
)

并在上面的对象中,我想访问oauth_token
oauth_token_secret
和_params:yii\authclient\OAuthToken:private
如何在php中获取这些值?
答案 0 :(得分:0)
https://github.com/yiisoft/yii2-authclient/blob/master/OAuthToken.php#L86
yii\authclient\OAuthToken
有公开方法getParams()
和getParam($name)