- class
HttpServerResponse(php\http\HttpServerResponse) - package
http - source
php/http/HttpServerResponse.php
Description
Class HttpServerResponse
->__construct()->status()->contentType()->contentLength()->charsetEncoding()->write()->body()->header()->redirect()->addCookie()- Cookie as array:->encodeRedirectUrl()->encodeUrl()->bodyStream()- Output Stream for body.->locale()->flush()- Forces any content in the buffer to be written to the client. A call
__construct(): voidstatus(int $status, string $message): php\http\HttpServerResponsecontentType(string $value): php\http\HttpServerResponsecontentLength(int $value): php\http\HttpServerResponsecharsetEncoding(string $encoding): php\http\HttpServerResponsewrite(mixed $content, string $charset): php\http\HttpServerResponsebody(string $content, string $charset): php\http\HttpServerResponseheader(string $name, string $value): php\http\HttpServerResponseredirect(string $location): php\http\HttpServerResponseaddCookie(array $cookie): php\http\HttpServerResponseCookie as array: [ name => string (required), value => string, path => string, domain => string, comment => string, secure => bool, httpOnly => bool, version => int ]
encodeRedirectUrl(string $url): stringencodeUrl(string $url): stringbodyStream(): php\io\StreamOutput Stream for body.
locale(php\util\Locale $locale): php\http\HttpServerResponseflush(): php\http\HttpServerResponseForces 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.