PHP Class Swoole\Controller

Mostrar archivo Open project: matyhtf/swoole_framework Class Usage Examples

Public Properties

Property Type Description
$if_filter boolean 是否对GET/POST/REQUEST/COOKIE参数进行转意
$is_ajax

Protected Properties

Property Type Description
$config
$model
$template_dir
$tpl_var
$traceInfo

Public Methods

Method Description
__construct ( Swoole $swoole )
__destruct ( )
assign ( $key, $value )
display ( string $tpl_file = '' ) render template file, then display it.
fetch ( $tpl_file = '' )
json ( string $data = '', integer $code, string $message = '' ) : string 输出JSON字串
message ( $code, $msg = 'success' )
showTrace ( ) : string 显示跟踪信息
value ( $array, $key, $default = '', $intval = false )

Protected Methods

Method Description
showTime ( ) : string 显示运行时间和内存占用
trace ( $title, $value = '' ) 跟踪信息

Method Details

__construct() public method

public __construct ( Swoole $swoole )
$swoole Swoole

__destruct() public method

public __destruct ( )

assign() public method

public assign ( $key, $value )

display() public method

render template file, then display it.
public display ( string $tpl_file = '' )
$tpl_file string

fetch() public method

public fetch ( $tpl_file = '' )

json() public method

输出JSON字串
public json ( string $data = '', integer $code, string $message = '' ) : string
$data string
$code integer
$message string
return string

message() public method

public message ( $code, $msg = 'success' )

showTime() protected method

显示运行时间和内存占用
protected showTime ( ) : string
return string

showTrace() public method

显示跟踪信息
public showTrace ( ) : string
return string

trace() protected method

跟踪信息
protected trace ( $title, $value = '' )
$title
$value

value() public method

public value ( $array, $key, $default = '', $intval = false )

Property Details

$config protected_oe property

protected $config

$if_filter public_oe property

是否对GET/POST/REQUEST/COOKIE参数进行转意
public bool $if_filter
return boolean

$is_ajax public_oe property

public $is_ajax

$model protected_oe property

protected $model

$template_dir protected_oe property

protected $template_dir

$tpl_var protected_oe property

protected $tpl_var

$traceInfo protected_oe property

protected $traceInfo