Response
in package
implements
ResponseInterface
Interfaces, Classes, Traits and Enums
- ResponseInterface
- Represents the HTTP response
Table of Contents
- $headers : array<string|int, mixed>
- Stores the headers for the response
- clearHeaders() : void
- Clears the headers
- header() : mixed
- Returns with a header value by name
- send() : void
- Sends the headers then the given body content
- setHeader() : void
- Sets a header for the response
Properties
$headers
Stores the headers for the response
protected
array<string|int, mixed>
$headers
= []
Methods
clearHeaders()
Clears the headers
public
clearHeaders() : void
Return values
void —header()
Returns with a header value by name
public
header(string $name[, mixed $default = null ]) : mixed
Parameters
- $name : string
- $default : mixed = null
Return values
mixed —send()
Sends the headers then the given body content
public
send([string $content = '' ]) : void
Parameters
- $content : string = ''
Return values
void —setHeader()
Sets a header for the response
public
setHeader(string $name, string $value) : void
Parameters
- $name : string
- $value : string