PHP Class Swoole\Controller

Afficher le fichier Open project: matyhtf/swoole_framework Class Usage Examples

Méthodes publiques

Свойство Type Description
$if_filter boolean 是否对GET/POST/REQUEST/COOKIE参数进行转意
$is_ajax

Protected Properties

Свойство Type Description
$config
$model
$template_dir
$tpl_var
$traceInfo

Méthodes publiques

Méthode 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 )

Méthodes protégées

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

Method Details

__construct() public méthode

public __construct ( Swoole $swoole )
$swoole Swoole

__destruct() public méthode

public __destruct ( )

assign() public méthode

public assign ( $key, $value )

display() public méthode

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

fetch() public méthode

public fetch ( $tpl_file = '' )

json() public méthode

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

message() public méthode

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

showTime() protected méthode

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

showTrace() public méthode

显示跟踪信息
public showTrace ( ) : string
Résultat string

trace() protected méthode

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

value() public méthode

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
Résultat 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