Base view class

class Jaf_View

 Methods

View constructor

__construct(array $data, string $viewsPath) 

Parameters

$data

array

$viewsPath

string

Exceptions

\Jaf_Exception

Get view data

get(string $name, null | mixed $default) : mixed | null

Examples: View->get('foo') View->get('foo.bar')

Parameters

$name

string

$default

nullmixed

Returns

mixednull

Set view data

set(string $name, mixed $value) : \Jaf_View

Examples: View->set('foo', 'Hello') View->set('foo.bar', array('hello' => 'world'))

Parameters

$name

string

$value

mixed

Returns

 Properties

 

Actual view data storage array

$_data : array

 

Path to the app views scripts Default is : APP_PATH/views

$_viewsPath : string