Properties

$data

$data : array

Model data

Type

array

$filters

$filters : array

Filters

Type

array

$output

$output : string

View output string

Type

string

Methods

__construct()

__construct(mixed  $template = null, array  $data = null) 

Constructor

Instantiate the view object

Parameters

mixed $template
array $data

hasTemplate()

hasTemplate() : boolean

Has a view template

Returns

boolean

getOutput()

getOutput() : string

Get rendered output

Returns

string

isFile()

isFile() : boolean

Is view template a file

Returns

boolean

isStream()

isStream() : boolean

Is view template a stream

Returns

boolean

getData()

getData() : array

Get all model data

Returns

array

get()

get(string  $key) : mixed

Get data

Parameters

string $key

Returns

mixed

setTemplate()

setTemplate(mixed  $template) : \Pop\View\View

Set view template

Parameters

mixed $template

Returns

\Pop\View\View

setData()

setData(array  $data = array()) : \Pop\View\View

Set all model data

Parameters

array $data

Returns

\Pop\View\View

addFilter()

addFilter(mixed  $call, mixed  $params = null) : \Pop\View\View

Add filter

Parameters

mixed $call
mixed $params

Returns

\Pop\View\View

addFilters()

addFilters(array  $filters) : \Pop\View\View

Add filters

Parameters

array $filters

Throws

\Pop\View\Exception

Returns

\Pop\View\View

clearFilters()

clearFilters() : \Pop\View\View

Clear filters

Returns

\Pop\View\View

set()

set(string  $name, mixed  $value) : \Pop\View\View

Set model data

Parameters

string $name
mixed $value

Returns

\Pop\View\View

merge()

merge(array  $data) : \Pop\View\View

Merge new model data

Parameters

array $data

Returns

\Pop\View\View

filter()

filter() : \Pop\View\View

Filter of data with the filters that have been set

Returns

\Pop\View\View

render()

render() : mixed

Render the view

Throws

\Pop\View\Exception

Returns

mixed

__toString()

__toString() : string

Return rendered view as string

Returns

string

__get()

__get(string  $name) : mixed

Get method to return the value of data[$name].

Parameters

string $name

Returns

mixed

__set()

__set(string  $name, mixed  $value) : mixed

Set method to set the property to the value of data[$name].

Parameters

string $name
mixed $value

Returns

mixed

__isset()

__isset(string  $name) : boolean

Return the isset value of data[$name].

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : void

Unset data[$name].

Parameters

string $name

offsetGet()

offsetGet(mixed  $offset) : mixed

ArrayAccess offsetGet

Parameters

mixed $offset

Returns

mixed

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : mixed

ArrayAccess offsetSet

Parameters

mixed $offset
mixed $value

Throws

\Pop\View\Exception

Returns

mixed

offsetExists()

offsetExists(mixed  $offset) : boolean

ArrayAccess offsetExists

Parameters

mixed $offset

Returns

boolean

offsetUnset()

offsetUnset(mixed  $offset) : void

ArrayAccess offsetUnset

Parameters

mixed $offset

Throws

\Pop\View\Exception

filterData()

filterData() : void

Filter data