class BaseModel implements ModelInterface (View source)

Properties

protected array $data Model Data

Methods

__construct(array $data)

Create a new Model instance

array
getData()

Get the Model data

mixed
getDataProperty(string $property)

Get Data Property

mixed|null
__get(string $property)

Handle calls to undefined properties.

mixed|null
__set(string $property, string $value)

Handle calls to undefined properties.

Details

at line line 19
__construct(array $data)

Create a new Model instance

Parameters

array $data

at line line 29
array getData()

Get the Model data

Return Value

array

at line line 41
mixed getDataProperty(string $property)

Get Data Property

Parameters

string $property

Return Value

mixed

at line line 56
mixed|null __get(string $property)

Handle calls to undefined properties.

Check whether an item with the key, same as the property, is available on the data property.

Parameters

string $property

Return Value

mixed|null

at line line 75
mixed|null __set(string $property, string $value)

Handle calls to undefined properties.

Sets an item with the defined value on the data property.

Parameters

string $property
string $value

Return Value

mixed|null