1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\EntityContainer; |
4
|
|
|
|
5
|
|
|
use AlgoWeb\ODataMetadata\IsOK; |
6
|
|
|
use AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\GEmptyElementExtensibilityTrait; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Class representing AssociationSetAnonymousType |
10
|
|
|
*/ |
11
|
|
|
class AssociationSetAnonymousType extends IsOK |
12
|
|
|
{ |
13
|
|
|
use GEmptyElementExtensibilityTrait; |
14
|
|
|
/** |
15
|
|
|
* @property string $name |
16
|
|
|
*/ |
17
|
|
|
private $name = null; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @property string $association |
21
|
|
|
*/ |
22
|
|
|
private $association = null; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @property |
26
|
|
|
* \AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\EntityContainer\AssociationSetAnonymousType\EndAnonymousType[] |
27
|
|
|
* $end |
28
|
|
|
*/ |
29
|
|
|
private $end = []; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* Gets as name |
33
|
|
|
* |
34
|
|
|
* @return string |
35
|
|
|
*/ |
36
|
|
|
public function getName() |
37
|
|
|
{ |
38
|
|
|
return $this->name; |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* Sets a new name |
43
|
|
|
* |
44
|
|
|
* @param string $name |
45
|
|
|
* @return self |
46
|
|
|
*/ |
47
|
|
|
public function setName($name) |
48
|
|
|
{ |
49
|
|
|
$this->name = $name; |
50
|
|
|
return $this; |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* Gets as association |
55
|
|
|
* |
56
|
|
|
* @return string |
57
|
|
|
*/ |
58
|
|
|
public function getAssociation() |
59
|
|
|
{ |
60
|
|
|
return $this->association; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* Sets a new association |
65
|
|
|
* |
66
|
|
|
* @param string $association |
67
|
|
|
* @return self |
68
|
|
|
*/ |
69
|
|
|
public function setAssociation($association) |
70
|
|
|
{ |
71
|
|
|
$this->association = $association; |
72
|
|
|
return $this; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Adds as end |
77
|
|
|
* |
78
|
|
|
* @return self |
79
|
|
|
* @param |
80
|
|
|
* \AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\EntityContainer\AssociationSetAnonymousType\EndAnonymousType |
81
|
|
|
* $end |
82
|
|
|
*/ |
83
|
|
|
public function addToEnd(EntityContainer\AssociationSetAnonymousType\EndAnonymousType $end) |
84
|
|
|
{ |
85
|
|
|
$this->end[] = $end; |
86
|
|
|
return $this; |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* isset end |
91
|
|
|
* |
92
|
|
|
* @param scalar $index |
93
|
|
|
* @return boolean |
94
|
|
|
*/ |
95
|
|
|
public function issetEnd($index) |
96
|
|
|
{ |
97
|
|
|
return isset($this->end[$index]); |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* unset end |
102
|
|
|
* |
103
|
|
|
* @param scalar $index |
104
|
|
|
* @return void |
105
|
|
|
*/ |
106
|
|
|
public function unsetEnd($index) |
107
|
|
|
{ |
108
|
|
|
unset($this->end[$index]); |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* Gets as end |
113
|
|
|
* |
114
|
|
|
* @return |
115
|
|
|
* \AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\EntityContainer\AssociationSetAnonymousType\EndAnonymousType[] |
116
|
|
|
*/ |
117
|
|
|
public function getEnd() |
118
|
|
|
{ |
119
|
|
|
return $this->end; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* Sets a new end |
124
|
|
|
* |
125
|
|
|
* @param |
126
|
|
|
* \AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\EntityContainer\AssociationSetAnonymousType\EndAnonymousType[] |
127
|
|
|
* $end |
128
|
|
|
* @return self |
129
|
|
|
*/ |
130
|
|
|
public function setEnd(array $end) |
131
|
|
|
{ |
132
|
|
|
$this->end = $end; |
133
|
|
|
return $this; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
public function isOK(&$msg = null) |
137
|
|
|
{ |
138
|
|
|
if (!$this->isExtensibilityElementOK($msg)) { |
139
|
|
|
return false; |
140
|
|
|
} |
141
|
|
|
return true; |
142
|
|
|
} |
143
|
|
|
} |
144
|
|
|
|