Documentation

Response
in package

Response

A single class for handling the response from the server to the client. Contains auxiliary functions for displaying content, redirecting, setting response codes.

Table of Contents

Methods

redirect()  : void
Redirects the request to the specified address.
redirectToRef()  : void
Redirects the request to the address from which the request came (by the referer).
setOutput()  : void
Sets the content of the response.
setResponseCode()  : void
Sets the server response code.
setToken()  : string
Sets a token to a session and returns it.
unsetToken()  : void
Removes the token from the session.

Methods

redirect()

Redirects the request to the specified address.

public redirect(string $url) : void
Parameters
$url : string

redirectToRef()

Redirects the request to the address from which the request came (by the referer).

public redirectToRef() : void

setOutput()

Sets the content of the response.

public setOutput(string $output) : void
Parameters
$output : string

setResponseCode()

Sets the server response code.

public setResponseCode(int $code) : void
Parameters
$code : int

setToken()

Sets a token to a session and returns it.

public setToken() : string
Return values
string

unsetToken()

Removes the token from the session.

public unsetToken() : void

        
On this page

Search results