Home > Backend Development > PHP Tutorial > 新浪微盘SDK中OAuth2 $oAuth是什么意思

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

WBOY
Release: 2016-06-06 20:33:19
Original
1581 people have browsed it

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>
Copy after login

实例:
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>
Copy after login
Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template