HTML

HTML 页面输出相关

package

Tango

author

Zheng Kai zhengkai@gmail.com

Methods

将 HTML 颜色(如 #0099FF)转换为 RGB 三个整数的数组

_colorRGB(string $sColor) : array
static
static
access

protected

Arguments

$sColor

string

Response

array

获取 tpl 对应的文件(通过相对路径而非 tpl 的类别名)

_getFile( $sFile) : string
static
static
access

public

Arguments

$sFile

Response

string

添加 CSS 路径

addCSS(string $sURL) : void
static
static
access

public

Arguments

$sURL

string

添加 JS 路径

addJS(string $sURL) : void
static
static
access

public

Arguments

$sURL

string

添加除 CSS/JS 外的额外 <meta> 段内的信息

addMeta(string $s) : void
static
static
access

public

Arguments

$s

string

给定两个颜色和过渡程度,返回中间色, 可用在表格的不同数量显示不用程度颜色等场合

colorGradient(float $fRate, string $sColorA, string $sColorB = '#FFFFFF') : void
static
static
access

public

Arguments

$fRate

float

$sColorA

string

$sColorB

string

递归对数组进行 HTML 转义(包括 key 和 value)

escape(string|array $mInput) : string|array
static
static
access

public

Arguments

$mInput

string|array

Response

string|array

获取整个 <meta> 段

getMeta() : void
static
static
access

public

获取 <title>

getTitle() : string
static
static
access

public

Response

string

获取 tpl 对应的文件

getTpl(string $sTpl) : string
static
static
access

public

Arguments

$sTpl

string

Response

string

默认渲染过程,不需要执行, \Tango\Core\Tango 会自动识别并执行

run() : void
static
static
access

public

如设成 false 则会在页面强调不要让搜索引擎索引本页

setFollow( $bFollow) : void
static
static
access

public

Arguments

$bFollow

如设成 false 则会在页面强调不要让搜索引擎索引本页所指向的链接

setIndex(boolean $bIndex) : void
static
static
access

public

Arguments

$bIndex

boolean

设置 <title>

setTitle(string $sTitle) : void
static
static
access

public

Arguments

$sTitle

string

如果 tpl 跟 www 的名字不一致,需在这里定义

setTpl(string|array $lTpl, string $sValue = NULL) : void
static
static
access

public

Arguments

$lTpl

string|array

$sValue

string

Properties

默认模板路径

_lTpl : 
static

Type(s)

JS 列表

_lJS : 
static

Type(s)

CSS 列表

_lCSS : 
static

Type(s)

除 CSS/JS 外的额外 <meta> 段内的信息

_sAddMeta : 
static

Type(s)

页面 <title> 内容

_sTitle : 
static

Type(s)

如设成 false 则会在页面强调不要让搜索引擎索引本页

_bRobotsIndex : 
static

Type(s)

如设成 false 则会在页面强调不要让搜索引擎索引本页所指向的链接

_bRobotsFollow : 
static

Type(s)