|
@@ 89-102 (lines=14) @@
|
| 86 |
|
* @return ResourceAssociationSetEnd|null Resource association set end for the |
| 87 |
|
* given parameters |
| 88 |
|
*/ |
| 89 |
|
public function getResourceAssociationSetEnd( |
| 90 |
|
ResourceSet $resourceSet, |
| 91 |
|
ResourceEntityType $resourceType, |
| 92 |
|
ResourceProperty $resourceProperty |
| 93 |
|
) { |
| 94 |
|
if ($this->end1->isBelongsTo($resourceSet, $resourceType, $resourceProperty)) { |
| 95 |
|
return $this->end1; |
| 96 |
|
} |
| 97 |
|
|
| 98 |
|
if ($this->end2->isBelongsTo($resourceSet, $resourceType, $resourceProperty)) { |
| 99 |
|
return $this->end2; |
| 100 |
|
} |
| 101 |
|
return null; |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
/** |
| 105 |
|
* Retrieve the related end for the given resource set, type and property. |
|
@@ 114-127 (lines=14) @@
|
| 111 |
|
* @return ResourceAssociationSetEnd|null Related resource association set end |
| 112 |
|
* for the given parameters |
| 113 |
|
*/ |
| 114 |
|
public function getRelatedResourceAssociationSetEnd( |
| 115 |
|
ResourceSet $resourceSet, |
| 116 |
|
ResourceEntityType $resourceType, |
| 117 |
|
ResourceProperty $resourceProperty |
| 118 |
|
) { |
| 119 |
|
if ($this->end1->isBelongsTo($resourceSet, $resourceType, $resourceProperty)) { |
| 120 |
|
return $this->end2; |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
if ($this->end2->isBelongsTo($resourceSet, $resourceType, $resourceProperty)) { |
| 124 |
|
return $this->end1; |
| 125 |
|
} |
| 126 |
|
return null; |
| 127 |
|
} |
| 128 |
|
|
| 129 |
|
/** |
| 130 |
|
* Get name of the association set. |