PHP Class AbstractAddons, thinksns

Author: SamPeng ([email protected])
Inheritance: implements AddonsInterface
Show file Open project: medz/thinksns-4

Protected Properties

Property Type Description
$author 插件版本号
$info 网站
$mid 模板变量
$model 登录用户ID
$path 插件名字
$pluginName 插件描述信息
$site 作者
$tVar 插件URL
$url 插件路径
$version

Public Methods

Method Description
__construct ( ) 初始化相关信息
display ( string $templateFile = '', string $charset = 'utf-8', string $contentType = 'text/html' ) : string 显示指定HTML页面
fetch ( string $templateFile = '', string $charset = 'utf-8', string $contentType = 'text/html' ) : string 渲染HTML页面
getAddonInfo ( ) : array 获取插件信息
getHooksList ( $name )
getPath ( ) : string 获取路径地址
getUrl ( ) : string 获取URL地址
setPath ( $path )
setUrl ( string $url ) 设置URL地址

Protected Methods

Method Description
assign ( string $name, string $value = '' ) 将数据渲染到HTML页面,设置模板变量的值
error ( string $message ) 错误提示方法
get ( string $name ) : mixed 获取指定模板变量的值
success ( string $message ) 成功提示方法

Private Methods

Method Description
_dispatch_jump ( string $message, integer $status = 1 ) 跳转操作

Method Details

__construct() public method

初始化相关信息
public __construct ( )

assign() protected method

将数据渲染到HTML页面,设置模板变量的值
protected assign ( string $name, string $value = '' )
$name string Key值
$value string Value值

display() public method

显示指定HTML页面
public display ( string $templateFile = '', string $charset = 'utf-8', string $contentType = 'text/html' ) : string
$templateFile string 模板文件路径
$charset string 字符集,默认为UTF8
$contentType string 内容类型,默认为text/html
return string HTML页面数据

error() protected method

错误提示方法
protected error ( string $message )
$message string 提示信息

fetch() public method

渲染HTML页面
public fetch ( string $templateFile = '', string $charset = 'utf-8', string $contentType = 'text/html' ) : string
$templateFile string 模板文件路径
$charset string 字符集,默认为UTF8
$contentType string 内容类型,默认为text/html
return string HTML页面数据

get() protected method

获取指定模板变量的值
protected get ( string $name ) : mixed
$name string Key值
return mixed 指定模板变量的值

getAddonInfo() public method

获取插件信息
public getAddonInfo ( ) : array
return array 插件信息

getHooksList() abstract public method

abstract public getHooksList ( $name )

getPath() public method

获取路径地址
public getPath ( ) : string
return string 路径地址

getUrl() public method

获取URL地址
public getUrl ( ) : string
return string URL地址

setPath() public method

public setPath ( $path )

setUrl() public method

设置URL地址
public setUrl ( string $url )
$url string URL地址

success() protected method

成功提示方法
protected success ( string $message )
$message string 提示信息

Property Details

$author protected property

插件版本号
protected $author

$info protected property

网站
protected $info

$mid protected property

模板变量
protected $mid

$model protected property

登录用户ID
protected $model

$path protected property

插件名字
protected $path

$pluginName protected property

插件描述信息
protected $pluginName

$site protected property

作者
protected $site

$tVar protected property

插件URL
protected $tVar

$url protected property

插件路径
protected $url

$version protected property

protected $version