$headers
$headers : array
List of all HTTP request headers.
Representation of an HTTP request.
setBody( $data) : \CodeIgniter\HTTP\Message|\CodeIgniter\HTTP\Response
Sets the body of the current message.
$data |
appendBody( $data) : \CodeIgniter\HTTP\Message|\CodeIgniter\HTTP\Response
Appends data to the body of the current message.
$data |
getHeader(string $name) : array|\CodeIgniter\HTTP\Header
Returns a single header object. If multiple headers with the same name exist, then will return an array of header objects.
string | $name |
getHeaderLine(string $name) : string
Retrieves a comma-separated string of the values for a single header.
This method returns all of the header values of the given case-insensitive header name as a string concatenated together using a comma.
NOTE: Not all header values may be appropriately represented using comma concatenation. For such headers, use getHeader() instead and supply your own delimiter when concatenating.
string | $name |
setHeader(string $name, array|null|string $value) : \CodeIgniter\HTTP\Message|\CodeIgniter\HTTP\Response
Sets a header and it's value.
string | $name | |
array|null|string | $value |
removeHeader(string $name) : \CodeIgniter\HTTP\Message
Removes a header from the list of headers we track.
string | $name |
appendHeader(string $name, string $value) : \CodeIgniter\HTTP\Message
Adds an additional header value to any headers that accept multiple values (i.e. are an array or implement ArrayAccess)
string | $name | |
string | $value |
prependHeader(string $name, string $value) : \CodeIgniter\HTTP\Message
Adds an additional header value to any headers that accept multiple values (i.e. are an array or implement ArrayAccess)
string | $name | |
string | $value |
setProtocolVersion(string $version) : \CodeIgniter\HTTP\Message
Sets the HTTP protocol version.
string | $version |
setMethod(string $method) : \CodeIgniter\HTTP\Request
Sets the request method. Used when spoofing the request.
string | $method |
getServer(string|array|null $index = null, integer|null $filter = null, null $flags = null) : mixed
Fetch an item from the $_SERVER array.
string|array|null | $index | Index for item to be fetched from $_SERVER |
integer|null | $filter | A filter name to be applied |
null | $flags |
fetchGlobal(string $method, string|array|null $index = null, integer|null $filter = null, mixed $flags = null) : mixed
Fetches one or more items from a global, like cookies, get, post, etc.
Can optionally filter the input when you retrieve it by passing in a filter.
If $type is an array, it must conform to the input allowed by the filter_input_array method.
http://php.net/manual/en/filter.filters.sanitize.php
string | $method | Input filter constant |
string|array|null | $index | |
integer|null | $filter | Filter constant |
mixed | $flags |