Heim  >  Artikel  >  Backend-Entwicklung  >  新浪微盘SDK中OAuth2 $oAuth是什么意思

新浪微盘SDK中OAuth2 $oAuth是什么意思

WBOY
WBOYOriginal
2016-06-06 20:33:191522Durchsuche

public function __construct(OAuth2 $oAuth, $root = 'sandbox')
前面有个OAuth2的类

回复内容:

public function __construct(OAuth2 $oAuth, $root = 'sandbox')
前面有个OAuth2的类

OAuth2 $oAuth 的意思是, 第一个参数 $oAuth 需要是 类(class)OAuth2的一个实例(new OAuth2)

这 sdk 怎么一会 O 小写, 一会大写的.

能不能好好地看一下文档,再来提问?
https://github.com/CloudSide/VdiskSDK-PHP/blob/master/Vdisk/Vdisk.php#...

<code>    /**
     * 构造函数
     * 
     * @access public
     * @param OAuth2 $oAuth \Vdisk\OAuth2实例
     * @param mixed $root 微盘容器的类型(basic or sandbox), 默认为sandbox
     * @return void
     */
    public function __construct(OAuth2 $oAuth, $root = 'sandbox') {

        $this->OAuth = $oAuth;
        $this->setRoot($root);
    }
</code>

实例:
http://vauth.appsina.com/Doc/classes/Vdisk.OAuth2.html

<code>新浪微盘 OAuth 认证类(OAuth2) Vdisk\OAuth2

授权机制说明请参考文档:http://vdisk.weibo.com/developers/index.php?module=api&action=authinfo
</code>
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn