Jet\DataModel_Definition_Model
The base abstract class that represents the definitions of an entity (This is a de facto translation of the definitional attributes into a usable form)..
From this abstract class it inherits Jet\DataModel_Definition_Model_Main, Jet\DataModel_Definition_Model_Related (also abstract), Jet\DataModel_Definition_Model_Related_1to1 and Jet\DataModel_Definition_Model_Related_1toN.
Overview of methods
Method | Meaning of |
---|---|
public __construct( string $data_model_class_name='' ) |
The only parameter $data_model_class_name is the name of the class to which the definition belongs. It is possible to create a generic instance of the definition without binding to a specific class. Therefore, the parameter is optional. |
public init( ) : void |
Initializes the definition bound to a specific class. |
public initRelations( ) : void |
Initializes internal and external relations. |
public getClassName( ) : string |
Returns the name of the class to which the definition belongs. |
public getModelName( ) : string |
Returns the name of the model - entity. |
public getDatabaseTableName( ) : string |
Returns the name of the database table. |
public setDatabaseTableName( string $database_table_name ) : void |
Sets the name of the database table. |
public getIDController( ) : DataModel_IDController |
Based on the definition, it creates and sets an instance of controller ID. |
public getIDControllerClassName( ) : string |
Returns the controller ID class name of. |
public getIDControllerOptions( ) : array |
Returns the parameters and settings of the controller ID. |
public getProperties( ) : DataModel_Definition_Property[] |
Returns the definitions of the entity properties. |
public getIdProperties( ) : DataModel_Definition_Property[] |
Returns the definitions of those entity properties that are defined as identifying. |
public hasProperty( string $property_name ) : bool |
Verifies whether the entity has the given property. |
public getProperty( string $property_name ) : DataModel_Definition_Property |
Returns the definition of a specific property. |
public getAllRelatedPropertyDefinitions( ) : DataModel_Definition_Property_DataModel[] |
Returns the definitions of all properties that bind subentities from all levels (including the definitions of subentity properties to all levels). |
public addKey( string $name, string $type, array $key_properties ) : void |
Add composite key to the definition. |
public getKeys( ) : DataModel_Definition_Key[] |
Returns key definitions. |
public getRelation( string $related_model_name ) : DataModel_Definition_Relation |
Returns the relation definition of the entity against the entity whose name is specified by the $related_model_name parameter. |
public getRelations( ) : DataModel_Definition_Relation[] |
Returns a list of definitions of all relations that the entity is linked to, both internal and external relations. |