Jet\DataModel_Relations

The purpose of this class is to maintain a list of known relations, both internal and external.

Overview of methods

Method Meaning of
public static add(
string $data_model_class_name,
DataModel_Definition_Relation $relation,
bool $ignore_if_exists=false
) : void
Adds a relation definition (parameter $data_model_class_name) to the list (parameter $relation) that the class/entity has.

If parameter $ignore_if_exists=false and the relation is already in the list, then an exception is thrown.
public static get(
string $data_model_class_name
) : DataModel_Definition_Relation[]
Returns a list of relations that the class/entity has.
Previous chapter
Jet\DataModel_Definition_Key
Next chapter
Jet\DataModel_Definition_Relation