DoubanBase.php
672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* @file DoubanBase.php
* @brief 豆瓣api的Base类
* @author JonChou <ilorn.mc@gmail.com>
* @date 2012-11-27
*/
class DoubanBase {
/**
* @brief 豆瓣API uri
*/
protected $uri;
/**
* @brief API请求方式
*/
protected $type;
/**
* @brief 豆瓣应用public key
*/
protected $clientId;
/**
* @brief 使用魔术方法获取类属性
*
* @param mixed $name
*
* @return mixed
*/
public function __get($name)
{
if (property_exists($this, $name)) {
return $this->$name;
}
}
}