class DataModel (View source)

Representation of a DataModel - a collection of DataLists for each different data type.

Usage: $model = new DataModel; $mainMenu = $model->SiteTree->where('"ParentID" = 0 AND "ShowInMenus" = 1');

Methods

static DataModel
inst()

Get the global DataModel.

static DataModel
set_inst(DataModel $inst)

Set the global DataModel, used when data is requested from static methods.

__get($class)

No description

__set($class, $item)

No description

Details

static DataModel inst()

Get the global DataModel.

Return Value

DataModel

static DataModel set_inst(DataModel $inst)

Set the global DataModel, used when data is requested from static methods.

Parameters

DataModel $inst

Return Value

DataModel

DataList __get($class)

Parameters

$class

Return Value

DataList

__set($class, $item)

Parameters

$class
$item