ResponseCacheItem
in package
Description of ResponseCacheItem
Tags
Table of Contents
Constants
- OUTPUT_CHUNK = 1048576
Properties
- $body : string
- $file : bool
- $headers : array<string, string|array<string|int, string>>
- $hit : bool
- $responseCode : int
Methods
- __construct() : mixed
- deserialize() : self
- send() : void
- serialize() : string
- sendCompressed() : void
Constants
OUTPUT_CHUNK
public
mixed
OUTPUT_CHUNK
= 1048576
Properties
$body
public
string
$body
$file
public
bool
$file
$headers
public
array<string, string|array<string|int, string>>
$headers
$hit
public
bool
$hit
$responseCode
public
int
$responseCode
Methods
__construct()
public
__construct([string $body = '' ][, int $responseCode = 0 ][, array<string, string|array<string|int, string>> $headers = [] ][, bool $hit = false ][, bool $file = false ]) : mixed
Parameters
- $body : string = ''
- $responseCode : int = 0
- $headers : array<string, string|array<string|int, string>> = []
- $hit : bool = false
- $file : bool = false
deserialize()
public
static deserialize(string $data) : self
Parameters
- $data : string
Return values
selfsend()
public
send([bool $compress = true ]) : void
Parameters
- $compress : bool = true
serialize()
public
serialize() : string
Return values
stringsendCompressed()
private
sendCompressed(string $encoding) : void
Parameters
- $encoding : string