1 | <?php |
||
10 | class ResourceAssociationSetEnd |
||
11 | { |
||
12 | /** |
||
13 | * Resource set for the association end. |
||
14 | * |
||
15 | * @var ResourceSet |
||
16 | */ |
||
17 | private $resourceSet; |
||
18 | |||
19 | /** |
||
20 | * Resource type for the association end. |
||
21 | * |
||
22 | * @var ResourceEntityType |
||
23 | */ |
||
24 | private $resourceType; |
||
25 | |||
26 | /** |
||
27 | * Concrete resource type for the association end. Should only be set if $resourceType is abstract. |
||
28 | * Is assumed to be a derived type of $resourceType if set. |
||
29 | * |
||
30 | * @var ResourceEntityType |
||
31 | */ |
||
32 | private $concreteType; |
||
33 | |||
34 | /** |
||
35 | * Resource property for the association end. |
||
36 | * |
||
37 | * @var ResourceProperty |
||
38 | */ |
||
39 | private $resourceProperty; |
||
40 | |||
41 | /** |
||
42 | * Construct new instance of ResourceAssociationSetEnd |
||
43 | * Note: The $resourceSet represents collection of an entity, The |
||
44 | * $resourceType can be this entity's type or type of any of the |
||
45 | * base resource of this entity, on which the navigation property |
||
46 | * represented by $resourceProperty is defined. |
||
47 | * |
||
48 | * @param ResourceSet $resourceSet Resource set for the association end |
||
49 | * @param ResourceEntityType $resourceType Resource type for the association end |
||
50 | * @param ResourceProperty|null $resourceProperty Resource property for the association end |
||
51 | * |
||
52 | * @throws \InvalidArgumentException |
||
53 | */ |
||
54 | public function __construct( |
||
98 | |||
99 | /** |
||
100 | * To check this relationship belongs to a specific resource set, type |
||
101 | * and property. |
||
102 | * |
||
103 | * @param ResourceSet $resourceSet Resource set for the association |
||
104 | * end |
||
105 | * @param ResourceType $resourceType Resource type for the association |
||
106 | * end |
||
107 | * @param ResourceProperty $resourceProperty Resource property for the |
||
108 | * association end |
||
109 | * |
||
110 | * @return bool |
||
111 | */ |
||
112 | public function isBelongsTo( |
||
123 | |||
124 | /** |
||
125 | * Gets reference to resource set. |
||
126 | * |
||
127 | * @return ResourceSet |
||
128 | */ |
||
129 | public function getResourceSet() |
||
133 | |||
134 | /** |
||
135 | * Gets reference to resource type. |
||
136 | * |
||
137 | * @return ResourceEntityType |
||
138 | */ |
||
139 | public function getResourceType() |
||
143 | |||
144 | /** |
||
145 | * Gets reference to concrete type. |
||
146 | * |
||
147 | * @return ResourceEntityType |
||
148 | */ |
||
149 | public function getConcreteType() |
||
153 | |||
154 | /** |
||
155 | * Gets reference to resource property. |
||
156 | * |
||
157 | * @return ResourceProperty |
||
158 | */ |
||
159 | public function getResourceProperty() |
||
163 | } |
||
164 |