IOutput
in
Very thin wrapper class to make output testable
Tags
Table of Contents
Methods
- getHttpResponseCode() : int
- setCookie() : mixed
- setHeader() : mixed
- setHttpResponseCode() : mixed
- setOutput() : mixed
- setReadfile() : bool
Methods
getHttpResponseCode()
public
getHttpResponseCode() : int
Tags
Return values
int —returns the current http response code
setCookie()
public
setCookie(string $name, string $value, int $expire, string $path, string $domain, bool $secure, bool $httpOnly[, string $sameSite = 'Lax' ]) : mixed
Parameters
- $name : string
- $value : string
- $expire : int
- $path : string
- $domain : string
- $secure : bool
- $httpOnly : bool
- $sameSite : string = 'Lax'
-
(added in 20)
Tags
setHeader()
public
setHeader(string $header) : mixed
Parameters
- $header : string
Tags
setHttpResponseCode()
public
setHttpResponseCode(int $code) : mixed
Parameters
- $code : int
-
sets the http status code
Tags
setOutput()
public
setOutput(string $out) : mixed
Parameters
- $out : string
Tags
setReadfile()
public
setReadfile(string|resource $path) : bool
Parameters
- $path : string|resource
-
or file handle
Tags
Return values
bool —false if an error occurred