IOutput
Very thin wrapper class to make output testable
Tags
Table of Contents
- 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) : mixed
Parameters
- $name : string
- $value : string
- $expire : int
- $path : string
- $domain : string
- $secure : bool
- $httpOnly : bool
Tags
Return values
mixed —setHeader()
public
setHeader(string $header) : mixed
Parameters
- $header : string
Tags
Return values
mixed —setHttpResponseCode()
public
setHttpResponseCode(int $code) : mixed
Parameters
- $code : int
-
sets the http status code
Tags
Return values
mixed —setOutput()
public
setOutput(string $out) : mixed
Parameters
- $out : string
Tags
Return values
mixed —setReadfile()
public
setReadfile(string|resource $path) : bool
Parameters
- $path : string|resource
-
or file handle
Tags
Return values
bool —false if an error occurred