PHP Class UserProfileModel, thinksns

Author: jason ([email protected])
Inheritance: extends Model
ファイルを表示 Open project: medz/thinksns-4

Public Properties

Property Type Description
$profileSetting
$sysProfile 静态档案配置字段

Protected Properties

Property Type Description
$fields
$tableName 部门的字段KEY

Public Methods

Method Description
cleanCache ( array $uids ) 清除指定用户的档案缓存
deleteProfileSet ( array $filed_ids ) : boolean 删除指定的资料配置字段
getCategoryList ( ) : array 获取用户的分类信息列表
getUserProfile ( integet $uid ) : array 获取指定用户的档案信息
getUserProfileByUids ( array $uids, string $category = null ) : array 批量获取多个用户的档案信息
getUserProfileForApi ( integer $uid ) : array 获取指定用户的档案信息,API使用
getUserProfileInputType ( ) : array 获取用户配置信息字段信息
getUserProfileSetting ( array $map = null, string $order = 'field_key, display_order ASC' ) : array 获取用户资料配置信息 - 不分页型
getUserProfileSettingTree ( array $map = null, string $order = 'field_key, display_order ASC' ) : array 获取用户资料配置信息的树形结构,已分类进行树形分类
getUserWorkDirectorTree ( integer $uid, integer $level = 3 ) : array 获取汇报关系,由上级至下级
saveUserProfile ( integer $uid, array $data ) : boolean 保存指定用户的档案信息

Private Methods

Method Description
_formatUserProfile ( array $profile ) : array 格式化用户的档案数据
_formatUserProfileSetting ( array $setting ) : array 格式化用户资料字段信息
_getUserProfileSetting ( array $map = null, string $order = 'display_order,field_id ASC' ) : array 获取用户资料字段信息
_getWorkDirector ( integer $uid ) : integer 获取指定用户的直接领导的UID
_makeUserProfileSettingTree ( array $setting, integer $parent_key ) : array 生成用户字段配置的树形结构,递归方法

Method Details

cleanCache() public method

清除指定用户的档案缓存
public cleanCache ( array $uids )
$uids array 用户UID数组

deleteProfileSet() public method

删除指定的资料配置字段
public deleteProfileSet ( array $filed_ids ) : boolean
$filed_ids array 配置字段ID数组
return boolean 是否删除成功

getCategoryList() public method

获取用户的分类信息列表
public getCategoryList ( ) : array
return array 用户的分类信息列表

getUserProfile() public method

获取指定用户的档案信息
public getUserProfile ( integet $uid ) : array
$uid integet 用户UID
return array 指定用户的档案信息

getUserProfileByUids() public method

批量获取多个用户的档案信息
public getUserProfileByUids ( array $uids, string $category = null ) : array
$uids array 用户UID数组
$category string 字段类型,未使用
return array 多个用户的档案信息

getUserProfileForApi() public method

获取指定用户的档案信息,API使用
public getUserProfileForApi ( integer $uid ) : array
$uid integer 用户UID
return array 指定用户的档案信息

getUserProfileInputType() public method

获取用户配置信息字段信息
public getUserProfileInputType ( ) : array
return array 用户配置信息字段信息

getUserProfileSetting() public method

获取用户资料配置信息 - 不分页型
public getUserProfileSetting ( array $map = null, string $order = 'field_key, display_order ASC' ) : array
$map array 查询条件
$order string 排序条件
return array 用户资料配置信息

getUserProfileSettingTree() public method

获取用户资料配置信息的树形结构,已分类进行树形分类
public getUserProfileSettingTree ( array $map = null, string $order = 'field_key, display_order ASC' ) : array
$map array 查询条件
$order string 排序条件
return array 用户资料配置信息的树形结构,已分类进行树形分类

getUserWorkDirectorTree() public method

获取汇报关系,由上级至下级
public getUserWorkDirectorTree ( integer $uid, integer $level = 3 ) : array
$uid integer 用户UID
$level integer 显示的层级值
return array 汇报关系树形结构

saveUserProfile() public method

保存指定用户的档案信息
public saveUserProfile ( integer $uid, array $data ) : boolean
$uid integer 用户UID
$data array 用户档案信息
return boolean 是否保存成功

Property Details

$fields protected_oe property

protected $fields

$profileSetting public_oe static_oe property

public static $profileSetting

$sysProfile public_oe static_oe property

静态档案配置字段
public static $sysProfile

$tableName protected_oe property

部门的字段KEY
protected $tableName