Skip to content

Latest commit

 

History

History
175 lines (124 loc) · 3.01 KB

File metadata and controls

175 lines (124 loc) · 3.01 KB

HttpServerResponse

  • class HttpServerResponse (php\http\HttpServerResponse)
  • package http
  • source php/http/HttpServerResponse.php

Description

Class HttpServerResponse


Methods


Methods

__construct()

__construct(): void

status()

status(int $status, string $message): php\http\HttpServerResponse

contentType()

contentType(string $value): php\http\HttpServerResponse

contentLength()

contentLength(int $value): php\http\HttpServerResponse

charsetEncoding()

charsetEncoding(string $encoding): php\http\HttpServerResponse

write()

write(mixed $content, string $charset): php\http\HttpServerResponse

body()

body(string $content, string $charset): php\http\HttpServerResponse

header()

header(string $name, string $value): php\http\HttpServerResponse

redirect()

redirect(string $location): php\http\HttpServerResponse

addCookie()

addCookie(array $cookie): php\http\HttpServerResponse

Cookie as array: [ name => string (required), value => string, path => string, domain => string, comment => string, secure => bool, httpOnly => bool, version => int ]


encodeRedirectUrl()

encodeRedirectUrl(string $url): string

encodeUrl()

encodeUrl(string $url): string

bodyStream()

bodyStream(): php\io\Stream

Output Stream for body.


locale()

locale(php\util\Locale $locale): php\http\HttpServerResponse

flush()

flush(): php\http\HttpServerResponse

Forces any content in the buffer to be written to the client. A call to this method automatically commits the response, meaning the status code and headers will be written.