Detailed Description
Instances of RelationDescription describe relations between different types of PersistentObjects.
A relation always has two ends: 'this' end and 'other' end.
Definition at line 21 of file RelationDescription.php.
Public Member Functions | |
__construct ($thisType, $thisRole, $otherType, $otherRole, $thisMinMultiplicity, $thisMaxMultiplicity, $otherMinMultiplicity, $otherMaxMultiplicity, $thisAggregationKind, $otherAggregationKind, $thisNavigability, $otherNavigability, $hierarchyType) | |
isMultiValued () | |
getThisType () | |
getThisMapper () | |
getThisRole () | |
getOtherType () | |
getOtherMapper () | |
getOtherRole () | |
getThisMinMultiplicity () | |
getThisMaxMultiplicity () | |
getOtherMinMultiplicity () | |
getOtherMaxMultiplicity () | |
getThisAggregationKind () | |
getOtherAggregationKind () | |
getThisNavigability () | |
getOtherNavigability () | |
getHierarchyType () | |
isSameRelation (RelationDescription $other) | |
Protected Attributes | |
$thisType = '' | |
$thisRole = '' | |
$otherType = '' | |
$otherRole = '' | |
$thisMinMultiplicity = '0' | |
$thisMaxMultiplicity = 'unbound' | |
$otherMinMultiplicity = '0' | |
$otherMaxMultiplicity = 'unbound' | |
$thisAggregationKind = 'none' | |
$otherAggregationKind = 'none' | |
$thisNavigability = true | |
$otherNavigability = true | |
$hierarchyType = 'undefined' | |
Constructor & Destructor Documentation
◆ __construct()
__construct | ( | $thisType, | |
$thisRole, | |||
$otherType, | |||
$otherRole, | |||
$thisMinMultiplicity, | |||
$thisMaxMultiplicity, | |||
$otherMinMultiplicity, | |||
$otherMaxMultiplicity, | |||
$thisAggregationKind, | |||
$otherAggregationKind, | |||
$thisNavigability, | |||
$otherNavigability, | |||
$hierarchyType | |||
) |
Constructor.
- Parameters
-
$thisType The PersistentObject type at this end $thisRole The role name at this end $otherType The PersistentObject type at the other end $otherRole The role name at the other end $thisMinMultiplicity The minimum number of instances at this end (number or 'unbound') $thisMaxMultiplicity The maximum number of instances at this end (number or 'unbound') $otherMinMultiplicity The minimum number of instances at the other end (number or 'unbound') $otherMaxMultiplicity The maximum number of instances at the other end (number or 'unbound') $thisAggregationKind The aggregation kind at this end ('none', 'shared' or 'composite') $otherAggregationKind The aggregation kind at the other end ('none', 'shared' or 'composite') $thisNavigability Boolean whether this end is navigable from the other end or not $otherNavigability Boolean whether the other end is navigable from this end or not $hierarchyType The hierarchy type that the other end has in relation to this end ('parent', 'child', 'undefined')
Definition at line 59 of file RelationDescription.php.
Member Function Documentation
◆ isMultiValued()
isMultiValued | ( | ) |
Determine if there may more than one objects at the other side of the relation.
- Returns
- Boolean
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 86 of file RelationDescription.php.
◆ getThisType()
getThisType | ( | ) |
Get the PersistentObject type at this end.
- Returns
- String
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 98 of file RelationDescription.php.
◆ getThisMapper()
getThisMapper | ( | ) |
Get the PersistentMapper at this end.
- Returns
- PersistenceMapper
Definition at line 106 of file RelationDescription.php.
◆ getThisRole()
getThisRole | ( | ) |
Get the role name at this end.
- Returns
- String
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 114 of file RelationDescription.php.
◆ getOtherType()
getOtherType | ( | ) |
Get the PersistentObject type at the other end.
- Returns
- String
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 122 of file RelationDescription.php.
◆ getOtherMapper()
getOtherMapper | ( | ) |
Get the PersistentMapper at the other end.
- Returns
- PersistenceMapper
Definition at line 130 of file RelationDescription.php.
◆ getOtherRole()
getOtherRole | ( | ) |
Get the role name at the other end.
- Returns
- String
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 138 of file RelationDescription.php.
◆ getThisMinMultiplicity()
getThisMinMultiplicity | ( | ) |
Get the minimum number of instances at this end.
- Returns
- Number or 'unbound'
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 146 of file RelationDescription.php.
◆ getThisMaxMultiplicity()
getThisMaxMultiplicity | ( | ) |
Get the maximum number of instances at this end.
- Returns
- Number or 'unbound'
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 154 of file RelationDescription.php.
◆ getOtherMinMultiplicity()
getOtherMinMultiplicity | ( | ) |
Get the minimum number of instances at the other end.
- Returns
- Number or 'unbound'
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 162 of file RelationDescription.php.
◆ getOtherMaxMultiplicity()
getOtherMaxMultiplicity | ( | ) |
Get the maximum number of instances at the other end.
- Returns
- Number or 'unbound'
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 170 of file RelationDescription.php.
◆ getThisAggregationKind()
getThisAggregationKind | ( | ) |
Get the aggregation kind at this end.
- Returns
- String 'none', 'shared' or 'composite'
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 178 of file RelationDescription.php.
◆ getOtherAggregationKind()
getOtherAggregationKind | ( | ) |
Get the aggregation kind at the other end.
- Returns
- String 'none', 'shared' or 'composite'
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 186 of file RelationDescription.php.
◆ getThisNavigability()
getThisNavigability | ( | ) |
Check whether this end is navigable from the other end or not.
- Returns
- Boolean
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 194 of file RelationDescription.php.
◆ getOtherNavigability()
getOtherNavigability | ( | ) |
Check whether the other end is navigable from this end or not.
- Returns
- Boolean
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 202 of file RelationDescription.php.
◆ getHierarchyType()
getHierarchyType | ( | ) |
Get the hierarchy type that the other end has in relation to this end.
- Returns
- String 'parent', 'child', 'undefined'
Reimplemented in RDBManyToManyRelationDescription.
Definition at line 210 of file RelationDescription.php.
◆ isSameRelation()
isSameRelation | ( | RelationDescription | $other | ) |
Check if another RelationDescription instance describes the same relation as this one.
This is true if they connect the same types using the same role names (independent from the direction). All other attributes are not compared.
- Parameters
-
$other The other RelationDescription
- Returns
- Boolean
Definition at line 221 of file RelationDescription.php.
Member Data Documentation
◆ $thisType
|
protected |
Definition at line 23 of file RelationDescription.php.
◆ $thisRole
|
protected |
Definition at line 24 of file RelationDescription.php.
◆ $otherType
|
protected |
Definition at line 25 of file RelationDescription.php.
◆ $otherRole
|
protected |
Definition at line 26 of file RelationDescription.php.
◆ $thisMinMultiplicity
|
protected |
Definition at line 28 of file RelationDescription.php.
◆ $thisMaxMultiplicity
|
protected |
Definition at line 29 of file RelationDescription.php.
◆ $otherMinMultiplicity
|
protected |
Definition at line 30 of file RelationDescription.php.
◆ $otherMaxMultiplicity
|
protected |
Definition at line 31 of file RelationDescription.php.
◆ $thisAggregationKind
|
protected |
Definition at line 33 of file RelationDescription.php.
◆ $otherAggregationKind
|
protected |
Definition at line 34 of file RelationDescription.php.
◆ $thisNavigability
|
protected |
Definition at line 36 of file RelationDescription.php.
◆ $otherNavigability
|
protected |
Definition at line 37 of file RelationDescription.php.
◆ $hierarchyType
|
protected |
Definition at line 39 of file RelationDescription.php.