\Dewdrop\AdminResponse

This is the standard response implementation. It will actually execute helper actions that were setup during process and will tell the controlling component to render the response to the client.

Summary

Methods
Properties
Constants
setOutput()
getOutput()
setPage()
getPage()
setWasProcessed()
wasProcessed()
setHelper()
getHelper()
render()
executeQueuedActions()
__toString()
No public properties found
No constants found
executeHelper()
$output
$page
$helper
$wasProcessed
N/A
No private methods found
No private properties found
N/A

Properties

$output

$output : 

The output generated during the page's render() method

Type

$page

$page : 

The page object currently being dispatched.

Type

$helper

$helper : 

The response helper provided to the page's process() method for short-circuiting of the dispatch logic. Will only be present if process() is called.

Type

$wasProcessed

$wasProcessed : boolean

Whether the process() method was called (i.e. the page's shouldProcess() method returned true.

Type

boolean

Methods

setOutput()

setOutput(string  $output) 

Set the output generated during the request.

Parameters

string $output

getOutput()

getOutput() : string

Return the generated output

Returns

string

setPage()

setPage(\Dewdrop\Admin\Page\PageAbstract  $page) : $this

Set the page object generating the response so it can be interacted with during testing.

Parameters

\Dewdrop\Admin\Page\PageAbstract $page

Returns

$this

setWasProcessed()

setWasProcessed(boolean  $wasProcessed) : $this

Set whether the page's process method was called.

Parameters

boolean $wasProcessed

Returns

$this

wasProcessed()

wasProcessed() : boolean

Check to see if the page's process() method was called

Returns

boolean

setHelper()

setHelper(\Dewdrop\Admin\ResponseHelper\Standard  $helper) : $this

Set the response helper associated with this response.

Parameters

\Dewdrop\Admin\ResponseHelper\Standard $helper

Returns

$this

getHelper()

getHelper() : \Dewdrop\Admin\ResponseHelper\Standard

Get the response helper. If one hasn't been set (process wasn't run, we return a new instance of the page's process helper to make testing easier.

Returns

\Dewdrop\Admin\ResponseHelper\Standard

render()

render() : \Dewdrop\Admin\Response

Render the output generated by the page

Returns

\Dewdrop\Admin\Response

executeQueuedActions()

executeQueuedActions() : \Dewdrop\Admin\Response

Execute the queued helper actions.

Returns

\Dewdrop\Admin\Response

__toString()

__toString() : string

When this object is used as a string, return the output.

Returns

string

executeHelper()

executeHelper() : mixed

This is separated into its own method to allow mocking of queued action execution during testing.

Returns

mixed