1 | <?php namespace Limoncello\Models; |
||
25 | class SchemaStorage implements SchemaStorageInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | private $relationshipTypes; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | private $reversedRelationships; |
||
36 | |||
37 | /** |
||
38 | * @var array |
||
39 | */ |
||
40 | private $foreignKeys; |
||
41 | |||
42 | /** |
||
43 | * @var array |
||
44 | */ |
||
45 | private $belongsToMany; |
||
46 | |||
47 | /** |
||
48 | * @var array |
||
49 | */ |
||
50 | private $tableNames; |
||
51 | |||
52 | /** |
||
53 | * @var array |
||
54 | */ |
||
55 | private $primaryKeys; |
||
56 | |||
57 | /** |
||
58 | * @var array |
||
59 | */ |
||
60 | private $attributeTypes; |
||
61 | |||
62 | /** |
||
63 | * @var array |
||
64 | */ |
||
65 | private $attributeLengths; |
||
66 | |||
67 | /** |
||
68 | * @inheritdoc |
||
69 | */ |
||
70 | 5 | public function getData() |
|
85 | |||
86 | /** |
||
87 | * @inheritdoc |
||
88 | */ |
||
89 | 5 | public function setData(array $data) |
|
94 | |||
95 | /** |
||
96 | * @inheritdoc |
||
97 | */ |
||
98 | 6 | public function registerClass($class, $tableName, $primaryKey, array $attributeTypes, array $attributeLengths) |
|
107 | |||
108 | /** |
||
109 | * @inheritdoc |
||
110 | */ |
||
111 | 1 | public function hasClass($class) |
|
117 | |||
118 | /** |
||
119 | * @inheritdoc |
||
120 | */ |
||
121 | 1 | public function getTable($class) |
|
127 | |||
128 | /** |
||
129 | * @inheritdoc |
||
130 | */ |
||
131 | 2 | public function getPrimaryKey($class) |
|
137 | |||
138 | /** |
||
139 | * @inheritdoc |
||
140 | */ |
||
141 | 1 | public function getAttributeTypes($class) |
|
147 | |||
148 | /** |
||
149 | * @inheritdoc |
||
150 | */ |
||
151 | 1 | public function getAttributeType($class, $name) |
|
157 | |||
158 | /** |
||
159 | * @inheritdoc |
||
160 | */ |
||
161 | 1 | public function hasAttributeType($class, $name) |
|
167 | |||
168 | /** |
||
169 | * @inheritdoc |
||
170 | */ |
||
171 | 1 | public function getAttributeLengths($class) |
|
177 | |||
178 | /** |
||
179 | * @inheritdoc |
||
180 | */ |
||
181 | 1 | public function hasAttributeLength($class, $name) |
|
187 | |||
188 | /** |
||
189 | * @inheritdoc |
||
190 | */ |
||
191 | 1 | public function getAttributeLength($class, $name) |
|
197 | |||
198 | /** |
||
199 | * @inheritdoc |
||
200 | */ |
||
201 | 2 | public function hasRelationship($class, $name) |
|
207 | |||
208 | /** |
||
209 | * @inheritdoc |
||
210 | */ |
||
211 | 2 | public function getRelationshipType($class, $name) |
|
217 | |||
218 | /** |
||
219 | * @inheritdoc |
||
220 | */ |
||
221 | 2 | public function getReverseRelationship($class, $name) |
|
227 | |||
228 | /** |
||
229 | * @inheritdoc |
||
230 | */ |
||
231 | 1 | public function getForeignKey($class, $name) |
|
237 | |||
238 | /** |
||
239 | * @inheritdoc |
||
240 | */ |
||
241 | 1 | public function getBelongsToManyRelationship($class, $name) |
|
247 | |||
248 | /** |
||
249 | * @inheritdoc |
||
250 | */ |
||
251 | 5 | public function registerBelongsToOneRelationship($class, $name, $foreignKey, $reverseClass, $reverseName) |
|
263 | |||
264 | /** |
||
265 | * @inheritdoc |
||
266 | */ |
||
267 | 5 | public function registerBelongsToManyRelationship( |
|
290 | |||
291 | /** |
||
292 | * @param int $type |
||
293 | * @param string $class |
||
294 | * @param string $name |
||
295 | */ |
||
296 | 5 | private function registerRelationshipType($type, $class, $name) |
|
305 | |||
306 | /** |
||
307 | * @param string $class |
||
308 | * @param string $name |
||
309 | * @param string $reverseClass |
||
310 | * @param string $reverseName |
||
311 | */ |
||
312 | 5 | private function registerReversedRelationship($class, $name, $reverseClass, $reverseName) |
|
320 | } |
||
321 |