\CodeIgniter\TestControllerResponse

Testable response from a controller

Summary

Methods
Properties
Constants
__construct()
setBody()
getBody()
setRequest()
setResponse()
request()
response()
isOK()
isRedirect()
__call()
No public properties found
No constants found
No protected methods found
$request
$response
$body
$dom
N/A
No private methods found
No private properties found
N/A

Properties

$body

$body : string

The message payload.

Type

string

Methods

__construct()

__construct() 

Constructor.

setBody()

setBody(string  $body) : $this

Set the body & DOM.

Parameters

string $body

Returns

$this

getBody()

getBody() : string

Retrieve the body.

Returns

string

isOK()

isOK() : boolean

Boils down the possible responses into a boolean valid/not-valid response type.

Returns

boolean

isRedirect()

isRedirect() : boolean

Returns whether or not the Response was a redirect response

Returns

boolean

__call()

__call(string  $function, mixed  $params) : mixed

Forward any unrecognized method calls to our DOMParser instance.

Parameters

string $function

Method name

mixed $params

Any method parameters

Returns

mixed