PHP Class Api, thinksns

Datei anzeigen Open project: medz/thinksns-4 Class Usage Examples

Public Properties

Property Type Description
$count
$data
$error
$id
$max_id
$mid
$page
$since_id 当前登陆的用户ID
$user_id
$user_name

Public Methods

Method Description
__construct ( boolean $location = false ) 架构函数
appError ( integer $errno, string $errstr, string $errfile, integer $errline ) 自定义错误处理
appException ( $e ) app异常处理
data ( array $data ) 通过api方法调用API时的赋值 api('WeiboStatuses')->data($data)->public_timeline();
error ( $msg = '' ) 返回错误信息
getError ( ) 返回错误信息
run ( ) 运行控制器
success ( $msg = '' ) 返回成功信息

Protected Methods

Method Description
verifyError ( ) : object | json 输出API认证失败信息

Private Methods

Method Description
verifyUser ( ) 用户身份认证

Method Details

__construct() public method

架构函数
public __construct ( boolean $location = false )
$location boolean 是否本机调用,本机调用不需要认证

appError() public static method

自定义错误处理
public static appError ( integer $errno, string $errstr, string $errfile, integer $errline )
$errno integer 错误类型
$errstr string 错误信息
$errfile string 错误文件
$errline integer 错误行数

appException() public static method

app异常处理
public static appException ( $e )

data() public method

通过api方法调用API时的赋值 api('WeiboStatuses')->data($data)->public_timeline();
public data ( array $data )
$data array 方法调用时的参数

error() public static method

返回错误信息
public static error ( $msg = '' )

getError() public static method

返回错误信息
public static getError ( )

run() public static method

运行控制器
public static run ( )

success() public static method

返回成功信息
public static success ( $msg = '' )

verifyError() protected method

输出API认证失败信息
protected verifyError ( ) : object | json
return object | json

Property Details

$count public_oe property

public $count

$data public_oe property

public $data

$error public_oe property

public $error

$id public_oe property

public $id

$max_id public_oe property

public $max_id

$mid public_oe property

public $mid

$page public_oe property

public $page

$since_id public_oe property

当前登陆的用户ID
public $since_id

$user_id public_oe property

public $user_id

$user_name public_oe property

public $user_name