class Response (View source)

Methods

static int|bool
status(int $code)

Get or set status code and return last status code. Note: if set status work, Event::on('changestatus') is trigged

static void
header($header, $value, bool $replace = true)

Short

static bool
content($type, string|null $charset = null)

Get or set status code and return last status code

static bool
cache(int $expires, int $modified = 0)

Set header to cache page Response::cache($seconds, $modified = 0);

static bool
download(string $name, int $length = 0)

Force download current page

Details

static int|bool status(int $code)

Get or set status code and return last status code. Note: if set status work, Event::on('changestatus') is trigged

Parameters

int $code

Return Value

int|bool

static void header($header, $value, bool $replace = true)

Short

Parameters

$header
$value
bool $replace

Return Value

void

static bool content($type, string|null $charset = null)

Get or set status code and return last status code

Parameters

$type
string|null $charset

Return Value

bool

static bool cache(int $expires, int $modified = 0)

Set header to cache page Response::cache($seconds, $modified = 0);

Parameters

int $expires
int $modified

Return Value

bool

static bool download(string $name, int $length = 0)

Force download current page

Parameters

string $name
int $length

Return Value

bool