PHP Class think\response\Redirect

Inheritance: extends think\Response
Mostra file Open project: top-think/framework Class Usage Examples

Protected Properties

Property Type Description
$options
$params URL参数

Public Methods

Method Description
__construct ( $data = '', $code = 302, array $header = [], array $options = [] )
getTargetUrl ( ) : string 获取跳转地址
params ( $params = [] )
remember ( ) 记住当前url后跳转
restore ( ) 跳转到上次记住的url
with ( string | array $name, mixed $value = null ) 重定向传值(通过Session)

Protected Methods

Method Description
output ( mixed $data ) : mixed 处理数据

Method Details

__construct() public method

public __construct ( $data = '', $code = 302, array $header = [], array $options = [] )
$header array
$options array

getTargetUrl() public method

获取跳转地址
public getTargetUrl ( ) : string
return string

output() protected method

处理数据
protected output ( mixed $data ) : mixed
$data mixed 要处理的数据
return mixed

params() public method

public params ( $params = [] )

remember() public method

记住当前url后跳转
public remember ( )

restore() public method

跳转到上次记住的url
public restore ( )

with() public method

重定向传值(通过Session)
public with ( string | array $name, mixed $value = null )
$name string | array 变量名或者数组
$value mixed

Property Details

$options protected_oe property

protected $options

$params protected_oe property

URL参数
protected $params