PHP Class MessageApi, thinksns

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

Public Methods

Method Description
can_send_message ( ) : array 判断是否有发私信的权限 --using
getAttach ( ) : array 获取附件信息
getSocketAddress ( ) 获取socket地址
getUserFace ( ) : array 获取用户头像
getUserInfo ( ) : array 获取用户信息
get_list_info ( ) : array 获取群聊信息 --using
get_message_list ( ) : array 获取当前用户聊天列表 --using
unreadcount ( )
uploadGroupLogo ( ) : array 上传群组头像接口
uploadImage ( ) : array 上传图片
uploadLocationImage ( ) : array 上传位置图片
uploadVoice ( ) : array 上传语音

Protected Methods

Method Description
uploadFile ( string $uploadType, string $attachType ) : array 上传文件

Private Methods

Method Description
__formatMessageDetail ( $message )
__formatMessageList ( $message )

Method Details

can_send_message() public method

判断是否有发私信的权限 --using
public can_send_message ( ) : array
return array 状态+提示

getAttach() public method

获取附件信息
Author: Medz Seven ([email protected])
public getAttach ( ) : array
return array

getSocketAddress() public method

获取socket地址
Author: Medz Seven ([email protected])
public getSocketAddress ( )

getUserFace() public method

获取用户头像
Author: Medz Seven ([email protected])
public getUserFace ( ) : array
return array

getUserInfo() public method

获取用户信息
Author: Medz Seven ([email protected])
public getUserInfo ( ) : array
return array

get_list_info() public method

获取群聊信息 --using
public get_list_info ( ) : array
return array 成员、及群聊创建者的信息

get_message_list() public method

获取当前用户聊天列表 --using
public get_message_list ( ) : array
return array

unreadcount() public method

public unreadcount ( )

uploadFile() protected method

上传文件
Author: Medz Seven ([email protected])
protected uploadFile ( string $uploadType, string $attachType ) : array
$uploadType string 上传文件的类型
$attachType string 保存文件的类型
return array

uploadImage() public method

上传图片
Author: Medz Seven ([email protected])
public uploadImage ( ) : array
return array

uploadLocationImage() public method

上传位置图片
Author: Medz Seven ([email protected])
public uploadLocationImage ( ) : array
return array

uploadVoice() public method

上传语音
Author: Medz Seven ([email protected])
public uploadVoice ( ) : array
return array