PHP 클래스 Workerman\Protocols\Http

파일 보기 프로젝트 열기: walkor/workerman 1 사용 예제들

공개 메소드들

메소드 설명
decode ( string $recv_buffer, TcpConnection $connection ) : array Parse $_POST、$_GET、$_COOKIE.
encode ( string $content, TcpConnection $connection ) : string Http encode.
end ( string $msg = '' ) End, like call exit in php-fpm.
getMimeTypesFile ( ) : string Get mime types.
header ( $content, $replace = true, $http_response_code ) : boolean | void 设置http头
headerRemove ( string $name ) : void Remove header.
input ( string $recv_buffer, TcpConnection $connection ) : integer Check the integrity of the package.
sessionStart ( ) : boolean sessionStart
sessionWriteClose ( ) : boolean Save session.
setcookie ( string $name, string $value = '', integer $maxage, string $path = '', string $domain = '', boolean $secure = false, boolean $HTTPOnly = false ) : boolean | void Set cookie.
tryGcSessions ( ) : void Try GC sessions.

보호된 메소드들

메소드 설명
parseUploadFiles ( string $http_body, string $http_post_boundary ) : void Parse $_FILES.

메소드 상세

decode() 공개 정적인 메소드

Parse $_POST、$_GET、$_COOKIE.
public static decode ( string $recv_buffer, TcpConnection $connection ) : array
$recv_buffer string
$connection Workerman\Connection\TcpConnection
리턴 array

encode() 공개 정적인 메소드

Http encode.
public static encode ( string $content, TcpConnection $connection ) : string
$content string
$connection Workerman\Connection\TcpConnection
리턴 string

end() 공개 정적인 메소드

End, like call exit in php-fpm.
public static end ( string $msg = '' )
$msg string

getMimeTypesFile() 공개 정적인 메소드

Get mime types.
public static getMimeTypesFile ( ) : string
리턴 string

header() 공개 정적인 메소드

设置http头
public static header ( $content, $replace = true, $http_response_code ) : boolean | void
리턴 boolean | void

headerRemove() 공개 정적인 메소드

Remove header.
public static headerRemove ( string $name ) : void
$name string
리턴 void

input() 공개 정적인 메소드

Check the integrity of the package.
public static input ( string $recv_buffer, TcpConnection $connection ) : integer
$recv_buffer string
$connection Workerman\Connection\TcpConnection
리턴 integer

parseUploadFiles() 보호된 정적인 메소드

Parse $_FILES.
protected static parseUploadFiles ( string $http_body, string $http_post_boundary ) : void
$http_body string
$http_post_boundary string
리턴 void

sessionStart() 공개 정적인 메소드

sessionStart
public static sessionStart ( ) : boolean
리턴 boolean

sessionWriteClose() 공개 정적인 메소드

Save session.
public static sessionWriteClose ( ) : boolean
리턴 boolean

setcookie() 공개 정적인 메소드

Set cookie.
public static setcookie ( string $name, string $value = '', integer $maxage, string $path = '', string $domain = '', boolean $secure = false, boolean $HTTPOnly = false ) : boolean | void
$name string
$value string
$maxage integer
$path string
$domain string
$secure boolean
$HTTPOnly boolean
리턴 boolean | void

tryGcSessions() 공개 정적인 메소드

Try GC sessions.
public static tryGcSessions ( ) : void
리턴 void