class AbstractView implements ArrayAccess (View source)

The AbstractView class.

Traits

The BootableTrait class.

Constants

DEFAULT_MODEL

Methods

__construct(array $data = null, array $config = null)

Method to instantiate the view.

void
boot()

boot

handleData()

handleData

mixed
getHandledData()

processData

Data
getData()

getData

setData(array $data)

setData

null
get(string $key, mixed $default = null)

get

$this
set(string $key, mixed $value)

set

string
render()

render

string
__toString()

__toString

boolean
offsetExists(mixed $offset)

Is a property exists or not.

mixed
offsetGet(mixed $offset)

Get a property.

void
offsetSet(mixed $offset, mixed $value)

Set a value to property.

void
offsetUnset(mixed $offset)

Unset a property.

string
getName(int $backwards = 2)

getName

setName(string $name)

Method to set property name

getPackage(int $backwards = 4)

Method to get property Package

setPackage(AbstractPackage $package)

Method to set property package

Structure
getConfig()

Method to get property Config

setConfig(Structure $config)

Method to set property config

Structure
__get(string $name)

__get

getModel(string $name = null)

Method to get property Model

setModel(ModelRepository $model, bool $default = null, string $customName = null)

Method to set property model

addModel(string $name, ModelRepository $model, string $default = null)

Method to add model with name.

removeModel(string $name)

removeModel

getRouter()

getRouter

Details

at line line 88
__construct(array $data = null, array $config = null)

Method to instantiate the view.

Parameters

array $data The data array.
array $config The view config.

at line line 114
void boot()

boot

Return Value

void

at line line 145
AbstractView handleData()

handleData

Return Value

AbstractView

at line line 170
mixed getHandledData()

processData

Return Value

mixed

at line line 180
Data getData()

getData

Return Value

Data

at line line 197
AbstractView setData(array $data)

setData

Parameters

array $data

Return Value

AbstractView Return self to support chaining.

at line line 212
null get(string $key, mixed $default = null)

get

Parameters

string $key
mixed $default

Return Value

null

at line line 225
$this set(string $key, mixed $value)

set

Parameters

string $key
mixed $value

Return Value

$this

at line line 239
string render()

render

Return Value

string

Exceptions

RuntimeException

at line line 291
string __toString()

__toString

Return Value

string

at line line 314
boolean offsetExists(mixed $offset)

Is a property exists or not.

Parameters

mixed $offset Offset key.

Return Value

boolean

at line line 327
mixed offsetGet(mixed $offset)

Get a property.

Parameters

mixed $offset Offset key.

Return Value

mixed The value to return.

Exceptions

InvalidArgumentException

at line line 341
void offsetSet(mixed $offset, mixed $value)

Set a value to property.

Parameters

mixed $offset Offset key.
mixed $value The value to set.

Return Value

void

Exceptions

InvalidArgumentException

at line line 354
void offsetUnset(mixed $offset)

Unset a property.

Parameters

mixed $offset Offset key to unset.

Return Value

void

Exceptions

InvalidArgumentException

at line line 369
string getName(int $backwards = 2)

getName

Parameters

int $backwards

Return Value

string

at line line 399
AbstractView setName(string $name)

Method to set property name

Parameters

string $name

Return Value

AbstractView Return self to support chaining.

at line line 413
AbstractPackage getPackage(int $backwards = 4)

Method to get property Package

Parameters

int $backwards

Return Value

AbstractPackage

at line line 445
AbstractView setPackage(AbstractPackage $package)

Method to set property package

Parameters

AbstractPackage $package

Return Value

AbstractView Return self to support chaining.

at line line 471
Structure getConfig()

Method to get property Config

Return Value

Structure

at line line 488
AbstractView setConfig(Structure $config)

Method to set property config

Parameters

Structure $config

Return Value

AbstractView Return self to support chaining.

at line line 505
Structure __get(string $name)

__get

Parameters

string $name

Return Value

Structure

at line line 532
ModelRepository getModel(string $name = null)

Method to get property Model

Parameters

string $name

Return Value

ModelRepository

at line line 546
AbstractView setModel(ModelRepository $model, bool $default = null, string $customName = null)

Method to set property model

Parameters

ModelRepository $model
bool $default
string $customName

Return Value

AbstractView Return self to support chaining.

at line line 562
AbstractView addModel(string $name, ModelRepository $model, string $default = null)

Method to add model with name.

Parameters

string $name
ModelRepository $model
string $default

Return Value

AbstractView Return self to support chaining.

at line line 576
AbstractView removeModel(string $name)

removeModel

Parameters

string $name

Return Value

AbstractView

at line line 588
PackageRouter getRouter()

getRouter

Return Value

PackageRouter