PHP Class Workerman\Protocols\Http

Afficher le fichier Open project: walkor/workerman Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
parseUploadFiles ( string $http_body, string $http_post_boundary ) : void Parse $_FILES.

Method Details

decode() public static méthode

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

encode() public static méthode

Http encode.
public static encode ( string $content, TcpConnection $connection ) : string
$content string
$connection Workerman\Connection\TcpConnection
Résultat string

end() public static méthode

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

getMimeTypesFile() public static méthode

Get mime types.
public static getMimeTypesFile ( ) : string
Résultat string

header() public static méthode

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

headerRemove() public static méthode

Remove header.
public static headerRemove ( string $name ) : void
$name string
Résultat void

input() public static méthode

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

parseUploadFiles() protected static méthode

Parse $_FILES.
protected static parseUploadFiles ( string $http_body, string $http_post_boundary ) : void
$http_body string
$http_post_boundary string
Résultat void

sessionStart() public static méthode

sessionStart
public static sessionStart ( ) : boolean
Résultat boolean

sessionWriteClose() public static méthode

Save session.
public static sessionWriteClose ( ) : boolean
Résultat boolean

setcookie() public static méthode

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

tryGcSessions() public static méthode

Try GC sessions.
public static tryGcSessions ( ) : void
Résultat void