\LiftKit\ResponseView

View Class

Represents a LiftKit view file as an object.

Summary

Methods
Properties
Constants
__toString()
prepare()
render()
__construct()
getData()
setData()
unsetData()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__toString()

__toString() : string

__toString function.

Implicit conversion to string.

Returns

string

prepare()

prepare() : string

Prepares the Response to be sent.

Returns

string

render()

render() 

Renders processed output to stdout.

__construct()

__construct(string  $filePath, array  $data = array()) 

Sets file and loaded data.

Parameters

string $filePath

Path to view file

array $data

Array of data to be passed to the view file

getData()

getData(mixed  $field = null) 

Gets data, by field or the entire set

Returns field from data or all fields as object.

Parameters

mixed $field

If set, returns only the value of a single field

setData()

setData(mixed  $arg1, string  $arg2 = null) : self

Sets data by key-value pair or by array/object. Will be merged with existing data.

Parameters

mixed $arg1

Array, or key if 2-parameter version is used

string $arg2

Value if 2-parameter version is used

Returns

self

unsetData()

unsetData(mixed  $field = null) : self

Unsets data either by field or all fields

Parameters

mixed $field

If set, will unset only a single field's data

Returns

self