PHP Class Swoole\Request

Show file Open project: matyhtf/swoole_framework Class Usage Examples

Public Properties

Property Type Description
$attrs StdClass
$body
$cookie
$ext_name
$fd integer 文件描述符
$files
$finish
$get
$header
$id
$meta
$post
$remote_ip 客户端IP
$remote_port 客户端PORT
$request
$server
$session
$status
$time integer 请求时间

Public Methods

Method Description
download ( $mime, $filename ) 发送下载声明
getBrowser ( ) : string 获取客户端浏览器信息
getClientIP ( ) : string 获取客户端IP
getOS ( ) : string 获取客户端操作系统信息
initWithLamp ( ) LAMP环境初始化
isWebSocket ( )
redirect ( $url, $mode = 302 ) 跳转网址
setGlobal ( ) 将原始请求信息转换到PHP超全局变量中
unsetGlobal ( )

Method Details

download() public method

发送下载声明
public download ( $mime, $filename )

getBrowser() public method

获取客户端浏览器信息
public getBrowser ( ) : string
return string

getClientIP() public method

获取客户端IP
public getClientIP ( ) : string
return string

getOS() public method

获取客户端操作系统信息
public getOS ( ) : string
return string

initWithLamp() public method

LAMP环境初始化
public initWithLamp ( )

isWebSocket() public method

public isWebSocket ( )

redirect() public method

跳转网址
public redirect ( $url, $mode = 302 )
$url

setGlobal() public method

将原始请求信息转换到PHP超全局变量中
public setGlobal ( )

unsetGlobal() public method

public unsetGlobal ( )

Property Details

$attrs public property

public StdClass $attrs
return StdClass

$body public property

public $body

$ext_name public property

public $ext_name

$fd public property

文件描述符
public int $fd
return integer

$files public property

public $files

$finish public property

public $finish

$get public property

public $get

$header public property

public $header

$id public property

public $id

$meta public property

public $meta

$post public property

public $post

$remote_ip public property

客户端IP
public $remote_ip

$remote_port public property

客户端PORT
public $remote_port

$request public property

public $request

$server public property

public $server

$session public property

public $session

$status public property

public $status

$time public property

请求时间
public int $time
return integer