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');

Properties

protected static DataModel $inst
protected array $customDataLists

Methods

public static 
inst()

Get the global DataModel.

public static 
set_inst(DataModel $inst)

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

public
__get($class)

No description

public
__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)

No description

Parameters

$class

Return Value

DataList

__set($class, $item)

No description

Parameters

$class
$item