PHP Interface MetaModels\IFactory

To create a MetaModel instance, create an instance of the factory. and call {@link \MetaModels\IFactory::getMetaModel()}. If you only have the id of a MetaModel, you can translate it to the MetaModel-name by invoking {@link \MetaModels\IFactory::translateIdToMetaModelName()} and then perform just as normal.
Inheritance: extends metamodels\IServiceContainerAware
Show file Open project: metamodels/core Interface Usage Examples

Public Methods

Method Description
collectNames ( ) : string[] Query for all known MetaModel names.
getMetaModel ( string $metaModelName ) : metamodels\IMetaModel | null Create a MetaModel instance.
getServiceContainer ( ) : metamodels\IMetaModelsServiceContainer Retrieve the service container.
translateIdToMetaModelName ( string $metaModelId ) : string Translate a MetaModel id to the corresponding name of the MetaModel.

Method Details

collectNames() public method

Query for all known MetaModel names.
public collectNames ( ) : string[]
return string[] all MetaModel names as string array.

getMetaModel() public method

Create a MetaModel instance.
public getMetaModel ( string $metaModelName ) : metamodels\IMetaModel | null
$metaModelName string The name of the MetaModel to create.
return metamodels\IMetaModel | null

getServiceContainer() public method

Retrieve the service container.
public getServiceContainer ( ) : metamodels\IMetaModelsServiceContainer
return metamodels\IMetaModelsServiceContainer

translateIdToMetaModelName() public method

Translate a MetaModel id to the corresponding name of the MetaModel.
public translateIdToMetaModelName ( string $metaModelId ) : string
$metaModelId string The id of the MetaModel.
return string The name of the MetaModel.