class ModelFactory (View source)

Model creation factory.

Methods

static 
getModelMap()

Retrieve the model map.

static ModelInterface
create(array $configuration = array(), string $type = '')

Create a new model.

static ModelInterface
createFromJson(array $configuration = '', string $type = '')

Create a new model from JSON.

static ModelInterface
callModelCreationMethod(string $method, array $configuration, string $type = '')

Create a new model from using the specified method.

static string
getModelType(array $configuration = array(), string $type = '')

Get the model type.

Details

at line line 27
static getModelMap()

Retrieve the model map.

at line line 42
static ModelInterface create(array $configuration = array(), string $type = '')

Create a new model.

Parameters

array $configuration The key, value pair array to use for populating the data model.
string $type The type of the data model to create.

Return Value

ModelInterface A data model representing the specified data type.

at line line 57
static ModelInterface createFromJson(array $configuration = '', string $type = '')

Create a new model from JSON.

Parameters

array $configuration The key, value pair array to use for populating the data model.
string $type The type of the data model to create.

Return Value

ModelInterface A data model representing the specified data type.

at line line 74
static ModelInterface callModelCreationMethod(string $method, array $configuration, string $type = '')

Create a new model from using the specified method.

Parameters

string $method The method to execute on the model for creation.
array $configuration The key, value pair array to use for populating the data model.
string $type The type of the data model to create.

Return Value

ModelInterface A data model representing the specified data type.

at line line 99
static string getModelType(array $configuration = array(), string $type = '')

Get the model type.

Parameters

array $configuration The key, value pair array to use for populating the data model.
string $type If set then we will check out data map and retrieve the model type.

Return Value

string The model data type.