1 | <?php |
||
9 | class ClassMetadata |
||
10 | { |
||
11 | /** |
||
12 | * Model name (entity class with full namespace, ie: "Foo\Entity\Article"). |
||
13 | * |
||
14 | * @var string |
||
15 | * @access private |
||
16 | */ |
||
17 | private $modelName; |
||
18 | |||
19 | /** |
||
20 | * Model short name (entity class without namespace, ie: "Article"). |
||
21 | * |
||
22 | * @var string |
||
23 | * @access private |
||
24 | */ |
||
25 | private $modelShortName; |
||
26 | |||
27 | /** |
||
28 | * Model key, used as path prefix for API calls. |
||
29 | * |
||
30 | * @var string |
||
31 | * @access private |
||
32 | */ |
||
33 | private $key; |
||
34 | |||
35 | /** |
||
36 | * Repository name (repository class with full namespace, ie: "Foo\Repository\ArticleRepository"). |
||
37 | * |
||
38 | * @var string |
||
39 | * @access private |
||
40 | */ |
||
41 | private $repositoryName; |
||
42 | |||
43 | /** |
||
44 | * attributeList |
||
45 | * |
||
46 | * @var Attribute[] |
||
47 | * @access private |
||
48 | */ |
||
49 | private $attributeList; |
||
50 | |||
51 | /** |
||
52 | * relationList |
||
53 | * |
||
54 | * @var Relation[] |
||
55 | * @access private |
||
56 | */ |
||
57 | private $relationList; |
||
58 | |||
59 | /** |
||
60 | * identifierAttribute |
||
61 | * |
||
62 | * @var Attribute |
||
63 | * @access private |
||
64 | */ |
||
65 | private $identifierAttribute; |
||
66 | |||
67 | /** |
||
68 | * Constructor. |
||
69 | * |
||
70 | * @param string $key |
||
71 | * @param string $modelName |
||
72 | * @param string $repositoryName |
||
73 | * @access public |
||
74 | */ |
||
75 | public function __construct($key, $modelName, $repositoryName) |
||
81 | |||
82 | /** |
||
83 | * Getter for modelName |
||
84 | * |
||
85 | * @return string |
||
86 | */ |
||
87 | public function getModelName() |
||
91 | |||
92 | /** |
||
93 | * Getter for modelShortName |
||
94 | * |
||
95 | * @return string |
||
96 | */ |
||
97 | public function getModelShortName() |
||
101 | |||
102 | /** |
||
103 | * Setter for modelName |
||
104 | * |
||
105 | * @param string $modelName |
||
106 | * @return ClassMetadata |
||
107 | */ |
||
108 | public function setModelName($modelName) |
||
115 | |||
116 | /** |
||
117 | * Getter for key |
||
118 | * |
||
119 | * @return string |
||
120 | */ |
||
121 | public function getKey() |
||
125 | |||
126 | /** |
||
127 | * Setter for key |
||
128 | * |
||
129 | * @param string $key |
||
130 | * @return ClassMetadata |
||
131 | */ |
||
132 | public function setKey($key) |
||
138 | |||
139 | /** |
||
140 | * getAttribute |
||
141 | * |
||
142 | * @param string $name |
||
143 | * @access public |
||
144 | * @return Attribute |
||
145 | */ |
||
146 | public function getAttribute($name) |
||
150 | |||
151 | /** |
||
152 | * getIdentifierAttribute |
||
153 | * |
||
154 | * @access public |
||
155 | * @return Attribute |
||
156 | */ |
||
157 | public function getIdentifierAttribute() |
||
161 | |||
162 | /** |
||
163 | * Getter for attributeList |
||
164 | * |
||
165 | * @return Attribute[] |
||
166 | */ |
||
167 | public function getAttributeList() |
||
171 | |||
172 | /** |
||
173 | * Setter for attributeList |
||
174 | * |
||
175 | * @param Attribute[] $attributeList |
||
176 | * @return ClassMetadata |
||
177 | */ |
||
178 | public function setAttributeList($attributeList) |
||
190 | |||
191 | /** |
||
192 | * Getter for relationList |
||
193 | * |
||
194 | * @return Relation[] |
||
195 | */ |
||
196 | public function getRelationList() |
||
200 | |||
201 | /** |
||
202 | * Setter for relationList |
||
203 | * |
||
204 | * @param Relation[] $relationList |
||
205 | * @return ClassMetadata |
||
206 | */ |
||
207 | public function setRelationList($relationList) |
||
212 | |||
213 | /** |
||
214 | * getRelation |
||
215 | * |
||
216 | * @param string $key |
||
217 | * @access public |
||
218 | * @return Relation|null |
||
219 | */ |
||
220 | public function getRelation($key) |
||
230 | |||
231 | /** |
||
232 | * Getter for repositoryName |
||
233 | * |
||
234 | * @return string |
||
235 | */ |
||
236 | public function getRepositoryName() |
||
240 | |||
241 | /** |
||
242 | * Setter for repositoryName |
||
243 | * |
||
244 | * @param string $repositoryName |
||
245 | * @return ClassMetadata |
||
246 | */ |
||
247 | public function setRepositoryName($repositoryName) |
||
252 | } |
||
253 |