PHP Class SourceModel, thinksns

Author: Chris Pollett
Inheritance: extends ParallelModel
显示文件 Open project: medz/thinksns-4 Class Usage Examples

Public Methods

Method Description
getCommentSource ( $data, $forApi = false )
getSourceInfo ( string $table, integer $row_id, boolean $_forApi = false, string $appname = 'public' ) : [type] 获取指定资源,并格式化输出

Private Methods

Method Description
getEditorImages ( string $content ) : array 获取编辑器内容中的第一个图片(非表情图片)
getInfoFromComment ( string $table, integer $row_id, boolean $forApi ) : array 从评论中提取资源数据
getInfoFromFeed ( string $table, integer $row_id, boolean $forApi ) : array 从Feed中提取资源数据

Method Details

getCommentSource() public method

public getCommentSource ( $data, $forApi = false )

getSourceInfo() public method

获取指定资源,并格式化输出
public getSourceInfo ( string $table, integer $row_id, boolean $_forApi = false, string $appname = 'public' ) : [type]
$table string 资源表名
$row_id integer 资源ID
$_forApi boolean 是否提供API,默认为false
$appname string 自定应用名称,默认为public
return [type]