Page

页面输出

负责 Web 访问时的页面输出(HTML/JSON/etc)

package

Tango

author

Zheng Kai zhengkai@gmail.com

Methods

如果扩展名是 json 时的输出

_parseJson() : void
static
static
access

protected

如果扩展名是 txt 时的输出

_parseText() : void
static
static
access

protected

调试页面(如仅限 127.0.0.1 访问的页面)对于不符合要求的请求显示 404,使外部无法确认调试页面是否是该地址

debugGate() : void
static
static
access

public

通用的错误页面

error(string $sError) : void
static
static
access

public

throws

Arguments

$sError

string

简短的错误信息

获取当前扩展名

get() : array
static
static
access

public

Response

array

是否已经处理完模板

isWellDone() : boolean
static
static
access

public

Response

boolean

页面跳转

jump(string $sURL) : void
static
static
access

public

throws

Arguments

$sURL

string

将要跳转的 URL

处理模板页

parse() : void
static
static
access

public

在必要时重置输出(如 www 页出现异常后重新渲染显示 error 500 页面),通常情况下不需要用到

reset() : void
static
static
access

public

设置扩展名(输出类型)

set(string $sExt, boolean $bTry = FALSE) : void
static
static
access

public

Arguments

$sExt

string

在 self::$_lExt 里列举的那些 key(html/json 等)

$bTry

boolean

如果为 true,在失败的时候不报错

不处理模板页

stopParse() : void
static
static
access

public

Properties

当前的扩展名

_aExt : 
static

Type(s)

可用的扩展名

_lExt : 
static

Type(s)

是否要做模板部分的处理

_bParse : 
static

Type(s)

是否已经处理完模板

_bWellDone : 
static

Type(s)