1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace PhpMyAdmin\Config\Settings; |
6
|
|
|
|
7
|
|
|
use function in_array; |
8
|
|
|
|
9
|
|
|
// phpcs:disable Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* Export defaults |
13
|
|
|
* |
14
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Export |
15
|
|
|
* |
16
|
|
|
* @psalm-immutable |
17
|
|
|
* @psalm-type StructureOrDataType = 'structure'|'data'|'structure_and_data' |
18
|
|
|
* @psalm-type ExportSettingsType = array{ |
19
|
|
|
* format: string, |
20
|
|
|
* method: 'custom'|'custom-no-form'|'quick', |
21
|
|
|
* compression: 'gzip'|'none'|'zip', |
22
|
|
|
* lock_tables: bool, |
23
|
|
|
* as_separate_files: bool, |
24
|
|
|
* asfile: bool, |
25
|
|
|
* charset: string, |
26
|
|
|
* onserver: bool, |
27
|
|
|
* onserver_overwrite: bool, |
28
|
|
|
* quick_export_onserver: bool, |
29
|
|
|
* quick_export_onserver_overwrite: bool, |
30
|
|
|
* remember_file_template: bool, |
31
|
|
|
* file_template_table: string, |
32
|
|
|
* file_template_database: string, |
33
|
|
|
* file_template_server: string, |
34
|
|
|
* codegen_structure_or_data: 'data'|'structure'|'structure_and_data', |
35
|
|
|
* codegen_format: 0|1, |
36
|
|
|
* ods_columns: bool, |
37
|
|
|
* ods_null: string, |
38
|
|
|
* odt_structure_or_data: 'data'|'structure'|'structure_and_data', |
39
|
|
|
* odt_columns: bool, |
40
|
|
|
* odt_relation: bool, |
41
|
|
|
* odt_comments: bool, |
42
|
|
|
* odt_mime: bool, |
43
|
|
|
* odt_null: string, |
44
|
|
|
* htmlword_structure_or_data: 'data'|'structure'|'structure_and_data', |
45
|
|
|
* htmlword_columns: bool, |
46
|
|
|
* htmlword_null: string, |
47
|
|
|
* texytext_structure_or_data: 'data'|'structure'|'structure_and_data', |
48
|
|
|
* texytext_columns: bool, |
49
|
|
|
* texytext_null: string, |
50
|
|
|
* csv_columns: bool, |
51
|
|
|
* csv_structure_or_data: 'data'|'structure'|'structure_and_data', |
52
|
|
|
* csv_null: string, |
53
|
|
|
* csv_separator: string, |
54
|
|
|
* csv_enclosed: string, |
55
|
|
|
* csv_escaped: string, |
56
|
|
|
* csv_terminated: string, |
57
|
|
|
* csv_removeCRLF: bool, |
58
|
|
|
* excel_columns: bool, |
59
|
|
|
* excel_null: string, |
60
|
|
|
* excel_edition: 'mac_excel2003'|'mac_excel2008'|'win', |
61
|
|
|
* excel_removeCRLF: bool, |
62
|
|
|
* excel_structure_or_data: 'data'|'structure'|'structure_and_data', |
63
|
|
|
* latex_structure_or_data: 'data'|'structure'|'structure_and_data', |
64
|
|
|
* latex_columns: bool, |
65
|
|
|
* latex_relation: bool, |
66
|
|
|
* latex_comments: bool, |
67
|
|
|
* latex_mime: bool, |
68
|
|
|
* latex_null: string, |
69
|
|
|
* latex_caption: bool, |
70
|
|
|
* latex_structure_caption: string, |
71
|
|
|
* latex_structure_continued_caption: string, |
72
|
|
|
* latex_data_caption: string, |
73
|
|
|
* latex_data_continued_caption: string, |
74
|
|
|
* latex_data_label: string, |
75
|
|
|
* latex_structure_label: string, |
76
|
|
|
* mediawiki_structure_or_data: 'data'|'structure'|'structure_and_data', |
77
|
|
|
* mediawiki_caption: bool, |
78
|
|
|
* mediawiki_headers: bool, |
79
|
|
|
* ods_structure_or_data: 'data'|'structure'|'structure_and_data', |
80
|
|
|
* pdf_structure_or_data: 'data'|'structure'|'structure_and_data', |
81
|
|
|
* phparray_structure_or_data: 'data'|'structure'|'structure_and_data', |
82
|
|
|
* json_structure_or_data: 'data'|'structure'|'structure_and_data', |
83
|
|
|
* json_pretty_print: bool, |
84
|
|
|
* json_unicode: bool, |
85
|
|
|
* sql_structure_or_data: 'data'|'structure'|'structure_and_data', |
86
|
|
|
* sql_compatibility: string, |
87
|
|
|
* sql_include_comments: bool, |
88
|
|
|
* sql_disable_fk: bool, |
89
|
|
|
* sql_views_as_tables: bool, |
90
|
|
|
* sql_metadata: bool, |
91
|
|
|
* sql_use_transaction: bool, |
92
|
|
|
* sql_create_database: bool, |
93
|
|
|
* sql_drop_database: bool, |
94
|
|
|
* sql_drop_table: bool, |
95
|
|
|
* sql_if_not_exists: bool, |
96
|
|
|
* sql_view_current_user: bool, |
97
|
|
|
* sql_or_replace_view: bool, |
98
|
|
|
* sql_procedure_function: bool, |
99
|
|
|
* sql_create_table: bool, |
100
|
|
|
* sql_create_view: bool, |
101
|
|
|
* sql_create_trigger: bool, |
102
|
|
|
* sql_auto_increment: bool, |
103
|
|
|
* sql_backquotes: bool, |
104
|
|
|
* sql_dates: bool, |
105
|
|
|
* sql_relation: bool, |
106
|
|
|
* sql_truncate: bool, |
107
|
|
|
* sql_delayed: bool, |
108
|
|
|
* sql_ignore: bool, |
109
|
|
|
* sql_utc_time: bool, |
110
|
|
|
* sql_hex_for_binary: bool, |
111
|
|
|
* sql_type: 'INSERT'|'REPLACE'|'UPDATE', |
112
|
|
|
* sql_max_query_size: int<0, max>, |
113
|
|
|
* sql_mime: bool, |
114
|
|
|
* sql_header_comment: string, |
115
|
|
|
* sql_insert_syntax: string, |
116
|
|
|
* pdf_report_title: string, |
117
|
|
|
* xml_structure_or_data: 'data'|'structure'|'structure_and_data', |
118
|
|
|
* xml_export_struc: bool, |
119
|
|
|
* xml_export_events: bool, |
120
|
|
|
* xml_export_functions: bool, |
121
|
|
|
* xml_export_procedures: bool, |
122
|
|
|
* xml_export_tables: bool, |
123
|
|
|
* xml_export_triggers: bool, |
124
|
|
|
* xml_export_views: bool, |
125
|
|
|
* xml_export_contents: bool, |
126
|
|
|
* yaml_structure_or_data: 'data'|'structure'|'structure_and_data', |
127
|
|
|
* remove_definer_from_definitions: bool, |
128
|
|
|
* } |
129
|
|
|
*/ |
130
|
|
|
final class Export |
131
|
|
|
{ |
132
|
|
|
/** |
133
|
|
|
* ```php |
134
|
|
|
* $cfg['Export']['format'] = 'sql'; |
135
|
|
|
* ``` |
136
|
|
|
* |
137
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Export_format |
138
|
|
|
* |
139
|
|
|
* @psalm-var 'codegen'|'csv'|'excel'|'htmlexcel'|'htmlword'|'latex'|'ods'|'odt'|'pdf'|'sql'|'texytext'|'xml'|'yaml' |
140
|
|
|
*/ |
141
|
|
|
public string $format; |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* ```php |
145
|
|
|
* $cfg['Export']['method'] = 'quick'; |
146
|
|
|
* ``` |
147
|
|
|
* |
148
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Export_method |
149
|
|
|
* |
150
|
|
|
* @psalm-var 'quick'|'custom'|'custom-no-form' |
151
|
|
|
*/ |
152
|
|
|
public string $method; |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* ```php |
156
|
|
|
* $cfg['Export']['compression'] = 'none'; |
157
|
|
|
* ``` |
158
|
|
|
* |
159
|
|
|
* @psalm-var 'none'|'zip'|'gzip' |
160
|
|
|
*/ |
161
|
|
|
public string $compression; |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* Whether to LOCK TABLES before exporting |
165
|
|
|
* |
166
|
|
|
* ```php |
167
|
|
|
* $cfg['Export']['lock_tables'] = false; |
168
|
|
|
* ``` |
169
|
|
|
*/ |
170
|
|
|
public bool $lock_tables; |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* Whether to export databases/tables as separate files |
174
|
|
|
* |
175
|
|
|
* ```php |
176
|
|
|
* $cfg['Export']['as_separate_files'] = false; |
177
|
|
|
* ``` |
178
|
|
|
*/ |
179
|
|
|
public bool $as_separate_files; |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* ```php |
183
|
|
|
* $cfg['Export']['asfile'] = true; |
184
|
|
|
* ``` |
185
|
|
|
*/ |
186
|
|
|
public bool $asfile; |
187
|
|
|
|
188
|
|
|
/** |
189
|
|
|
* ```php |
190
|
|
|
* $cfg['Export']['charset'] = ''; |
191
|
|
|
* ``` |
192
|
|
|
* |
193
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Export_charset |
194
|
|
|
*/ |
195
|
|
|
public string $charset; |
196
|
|
|
|
197
|
|
|
/** |
198
|
|
|
* ```php |
199
|
|
|
* $cfg['Export']['onserver'] = false; |
200
|
|
|
* ``` |
201
|
|
|
*/ |
202
|
|
|
public bool $onserver; |
203
|
|
|
|
204
|
|
|
/** |
205
|
|
|
* ```php |
206
|
|
|
* $cfg['Export']['onserver_overwrite'] = false; |
207
|
|
|
* ``` |
208
|
|
|
*/ |
209
|
|
|
public bool $onserver_overwrite; |
210
|
|
|
|
211
|
|
|
/** |
212
|
|
|
* ```php |
213
|
|
|
* $cfg['Export']['quick_export_onserver'] = false; |
214
|
|
|
* ``` |
215
|
|
|
*/ |
216
|
|
|
public bool $quick_export_onserver; |
217
|
|
|
|
218
|
|
|
/** |
219
|
|
|
* ```php |
220
|
|
|
* $cfg['Export']['quick_export_onserver_overwrite'] = false; |
221
|
|
|
* ``` |
222
|
|
|
*/ |
223
|
|
|
public bool $quick_export_onserver_overwrite; |
224
|
|
|
|
225
|
|
|
/** |
226
|
|
|
* ```php |
227
|
|
|
* $cfg['Export']['remember_file_template'] = true; |
228
|
|
|
* ``` |
229
|
|
|
*/ |
230
|
|
|
public bool $remember_file_template; |
231
|
|
|
|
232
|
|
|
/** |
233
|
|
|
* Default filename template for table exports. |
234
|
|
|
* |
235
|
|
|
* ```php |
236
|
|
|
* $cfg['Export']['file_template_table'] = '@TABLE@'; |
237
|
|
|
* ``` |
238
|
|
|
* |
239
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Export_file_template_table |
240
|
|
|
*/ |
241
|
|
|
public string $file_template_table; |
242
|
|
|
|
243
|
|
|
/** |
244
|
|
|
* Default filename template for database exports. |
245
|
|
|
* |
246
|
|
|
* ```php |
247
|
|
|
* $cfg['Export']['file_template_database'] = '@DATABASE@'; |
248
|
|
|
* ``` |
249
|
|
|
* |
250
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Export_file_template_database |
251
|
|
|
*/ |
252
|
|
|
public string $file_template_database; |
253
|
|
|
|
254
|
|
|
/** |
255
|
|
|
* Default filename template for server exports. |
256
|
|
|
* |
257
|
|
|
* ```php |
258
|
|
|
* $cfg['Export']['file_template_server'] = '@SERVER@'; |
259
|
|
|
* ``` |
260
|
|
|
* |
261
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Export_file_template_server |
262
|
|
|
*/ |
263
|
|
|
public string $file_template_server; |
264
|
|
|
|
265
|
|
|
/** |
266
|
|
|
* ```php |
267
|
|
|
* $cfg['Export']['codegen_structure_or_data'] = 'data'; |
268
|
|
|
* ``` |
269
|
|
|
* |
270
|
|
|
* @psalm-var StructureOrDataType |
271
|
|
|
*/ |
272
|
|
|
public string $codegen_structure_or_data; |
273
|
|
|
|
274
|
|
|
/** |
275
|
|
|
* ```php |
276
|
|
|
* $cfg['Export']['codegen_format'] = 0; |
277
|
|
|
* ``` |
278
|
|
|
* |
279
|
|
|
* @psalm-var 0|1 |
280
|
|
|
*/ |
281
|
|
|
public int $codegen_format; |
282
|
|
|
|
283
|
|
|
/** |
284
|
|
|
* ```php |
285
|
|
|
* $cfg['Export']['ods_columns'] = false; |
286
|
|
|
* ``` |
287
|
|
|
*/ |
288
|
|
|
public bool $ods_columns; |
289
|
|
|
|
290
|
|
|
/** |
291
|
|
|
* ```php |
292
|
|
|
* $cfg['Export']['ods_null'] = 'NULL'; |
293
|
|
|
* ``` |
294
|
|
|
*/ |
295
|
|
|
public string $ods_null; |
296
|
|
|
|
297
|
|
|
/** |
298
|
|
|
* ```php |
299
|
|
|
* $cfg['Export']['odt_structure_or_data'] = 'structure_and_data'; |
300
|
|
|
* ``` |
301
|
|
|
* |
302
|
|
|
* @psalm-var StructureOrDataType |
303
|
|
|
*/ |
304
|
|
|
public string $odt_structure_or_data; |
305
|
|
|
|
306
|
|
|
/** |
307
|
|
|
* ```php |
308
|
|
|
* $cfg['Export']['odt_columns'] = true; |
309
|
|
|
* ``` |
310
|
|
|
*/ |
311
|
|
|
public bool $odt_columns; |
312
|
|
|
|
313
|
|
|
/** |
314
|
|
|
* ```php |
315
|
|
|
* $cfg['Export']['odt_relation'] = true; |
316
|
|
|
* ``` |
317
|
|
|
*/ |
318
|
|
|
public bool $odt_relation; |
319
|
|
|
|
320
|
|
|
/** |
321
|
|
|
* ```php |
322
|
|
|
* $cfg['Export']['odt_comments'] = true; |
323
|
|
|
* ``` |
324
|
|
|
*/ |
325
|
|
|
public bool $odt_comments; |
326
|
|
|
|
327
|
|
|
/** |
328
|
|
|
* ```php |
329
|
|
|
* $cfg['Export']['odt_mime'] = true; |
330
|
|
|
* ``` |
331
|
|
|
*/ |
332
|
|
|
public bool $odt_mime; |
333
|
|
|
|
334
|
|
|
/** |
335
|
|
|
* ```php |
336
|
|
|
* $cfg['Export']['odt_null'] = 'NULL'; |
337
|
|
|
* ``` |
338
|
|
|
*/ |
339
|
|
|
public string $odt_null; |
340
|
|
|
|
341
|
|
|
/** |
342
|
|
|
* ```php |
343
|
|
|
* $cfg['Export']['htmlword_structure_or_data'] = 'structure_and_data'; |
344
|
|
|
* ``` |
345
|
|
|
* |
346
|
|
|
* @psalm-var StructureOrDataType |
347
|
|
|
*/ |
348
|
|
|
public string $htmlword_structure_or_data; |
349
|
|
|
|
350
|
|
|
/** |
351
|
|
|
* ```php |
352
|
|
|
* $cfg['Export']['htmlword_columns'] = false; |
353
|
|
|
* ``` |
354
|
|
|
*/ |
355
|
|
|
public bool $htmlword_columns; |
356
|
|
|
|
357
|
|
|
/** |
358
|
|
|
* ```php |
359
|
|
|
* $cfg['Export']['htmlword_null'] = 'NULL'; |
360
|
|
|
* ``` |
361
|
|
|
*/ |
362
|
|
|
public string $htmlword_null; |
363
|
|
|
|
364
|
|
|
/** |
365
|
|
|
* ```php |
366
|
|
|
* $cfg['Export']['texytext_structure_or_data'] = 'structure_and_data'; |
367
|
|
|
* ``` |
368
|
|
|
* |
369
|
|
|
* @psalm-var StructureOrDataType |
370
|
|
|
*/ |
371
|
|
|
public string $texytext_structure_or_data; |
372
|
|
|
|
373
|
|
|
/** |
374
|
|
|
* ```php |
375
|
|
|
* $cfg['Export']['texytext_columns'] = false; |
376
|
|
|
* ``` |
377
|
|
|
*/ |
378
|
|
|
public bool $texytext_columns; |
379
|
|
|
|
380
|
|
|
/** |
381
|
|
|
* ```php |
382
|
|
|
* $cfg['Export']['texytext_null'] = 'NULL'; |
383
|
|
|
* ``` |
384
|
|
|
*/ |
385
|
|
|
public string $texytext_null; |
386
|
|
|
|
387
|
|
|
/** |
388
|
|
|
* ```php |
389
|
|
|
* $cfg['Export']['csv_columns'] = true; |
390
|
|
|
* ``` |
391
|
|
|
*/ |
392
|
|
|
public bool $csv_columns; |
393
|
|
|
|
394
|
|
|
/** |
395
|
|
|
* ```php |
396
|
|
|
* $cfg['Export']['csv_structure_or_data'] = 'data'; |
397
|
|
|
* ``` |
398
|
|
|
* |
399
|
|
|
* @psalm-var StructureOrDataType |
400
|
|
|
*/ |
401
|
|
|
public string $csv_structure_or_data; |
402
|
|
|
|
403
|
|
|
/** |
404
|
|
|
* ```php |
405
|
|
|
* $cfg['Export']['csv_null'] = 'NULL'; |
406
|
|
|
* ``` |
407
|
|
|
*/ |
408
|
|
|
public string $csv_null; |
409
|
|
|
|
410
|
|
|
/** |
411
|
|
|
* ```php |
412
|
|
|
* $cfg['Export']['csv_separator'] = ','; |
413
|
|
|
* ``` |
414
|
|
|
*/ |
415
|
|
|
public string $csv_separator; |
416
|
|
|
|
417
|
|
|
/** |
418
|
|
|
* ```php |
419
|
|
|
* $cfg['Export']['csv_enclosed'] = '"'; |
420
|
|
|
* ``` |
421
|
|
|
*/ |
422
|
|
|
public string $csv_enclosed; |
423
|
|
|
|
424
|
|
|
/** |
425
|
|
|
* ```php |
426
|
|
|
* $cfg['Export']['csv_escaped'] = '"'; |
427
|
|
|
* ``` |
428
|
|
|
*/ |
429
|
|
|
public string $csv_escaped; |
430
|
|
|
|
431
|
|
|
/** |
432
|
|
|
* ```php |
433
|
|
|
* $cfg['Export']['csv_terminated'] = 'AUTO'; |
434
|
|
|
* ``` |
435
|
|
|
*/ |
436
|
|
|
public string $csv_terminated; |
437
|
|
|
|
438
|
|
|
/** |
439
|
|
|
* ```php |
440
|
|
|
* $cfg['Export']['csv_removeCRLF'] = false; |
441
|
|
|
* ``` |
442
|
|
|
*/ |
443
|
|
|
public bool $csv_removeCRLF; |
444
|
|
|
|
445
|
|
|
/** |
446
|
|
|
* ```php |
447
|
|
|
* $cfg['Export']['excel_columns'] = true; |
448
|
|
|
* ``` |
449
|
|
|
*/ |
450
|
|
|
public bool $excel_columns; |
451
|
|
|
|
452
|
|
|
/** |
453
|
|
|
* ```php |
454
|
|
|
* $cfg['Export']['excel_null'] = 'NULL'; |
455
|
|
|
* ``` |
456
|
|
|
*/ |
457
|
|
|
public string $excel_null; |
458
|
|
|
|
459
|
|
|
/** |
460
|
|
|
* ```php |
461
|
|
|
* $cfg['Export']['excel_edition'] = 'win'; |
462
|
|
|
* ``` |
463
|
|
|
* |
464
|
|
|
* @psalm-var 'win'|'mac_excel2003'|'mac_excel2008' |
465
|
|
|
*/ |
466
|
|
|
public string $excel_edition; |
467
|
|
|
|
468
|
|
|
/** |
469
|
|
|
* ```php |
470
|
|
|
* $cfg['Export']['excel_removeCRLF'] = false; |
471
|
|
|
* ``` |
472
|
|
|
*/ |
473
|
|
|
public bool $excel_removeCRLF; |
474
|
|
|
|
475
|
|
|
/** |
476
|
|
|
* ```php |
477
|
|
|
* $cfg['Export']['excel_structure_or_data'] = 'data'; |
478
|
|
|
* ``` |
479
|
|
|
* |
480
|
|
|
* @psalm-var StructureOrDataType |
481
|
|
|
*/ |
482
|
|
|
public string $excel_structure_or_data; |
483
|
|
|
|
484
|
|
|
/** |
485
|
|
|
* ```php |
486
|
|
|
* $cfg['Export']['latex_structure_or_data'] = 'structure_and_data'; |
487
|
|
|
* ``` |
488
|
|
|
* |
489
|
|
|
* @psalm-var StructureOrDataType |
490
|
|
|
*/ |
491
|
|
|
public string $latex_structure_or_data; |
492
|
|
|
|
493
|
|
|
/** |
494
|
|
|
* ```php |
495
|
|
|
* $cfg['Export']['latex_columns'] = true; |
496
|
|
|
* ``` |
497
|
|
|
*/ |
498
|
|
|
public bool $latex_columns; |
499
|
|
|
|
500
|
|
|
/** |
501
|
|
|
* ```php |
502
|
|
|
* $cfg['Export']['latex_relation'] = true; |
503
|
|
|
* ``` |
504
|
|
|
*/ |
505
|
|
|
public bool $latex_relation; |
506
|
|
|
|
507
|
|
|
/** |
508
|
|
|
* ```php |
509
|
|
|
* $cfg['Export']['latex_comments'] = true; |
510
|
|
|
* ``` |
511
|
|
|
*/ |
512
|
|
|
public bool $latex_comments; |
513
|
|
|
|
514
|
|
|
/** |
515
|
|
|
* ```php |
516
|
|
|
* $cfg['Export']['latex_mime'] = true; |
517
|
|
|
* ``` |
518
|
|
|
*/ |
519
|
|
|
public bool $latex_mime; |
520
|
|
|
|
521
|
|
|
/** |
522
|
|
|
* ```php |
523
|
|
|
* $cfg['Export']['latex_null'] = '\textit{NULL}'; |
524
|
|
|
* ``` |
525
|
|
|
*/ |
526
|
|
|
public string $latex_null; |
527
|
|
|
|
528
|
|
|
/** |
529
|
|
|
* ```php |
530
|
|
|
* $cfg['Export']['latex_caption'] = true; |
531
|
|
|
* ``` |
532
|
|
|
*/ |
533
|
|
|
public bool $latex_caption; |
534
|
|
|
|
535
|
|
|
/** |
536
|
|
|
* ```php |
537
|
|
|
* $cfg['Export']['latex_structure_caption'] = 'strLatexStructure'; |
538
|
|
|
* ``` |
539
|
|
|
*/ |
540
|
|
|
public string $latex_structure_caption; |
541
|
|
|
|
542
|
|
|
/** |
543
|
|
|
* ```php |
544
|
|
|
* $cfg['Export']['latex_structure_continued_caption'] = 'strLatexStructure strLatexContinued'; |
545
|
|
|
* ``` |
546
|
|
|
*/ |
547
|
|
|
public string $latex_structure_continued_caption; |
548
|
|
|
|
549
|
|
|
/** |
550
|
|
|
* ```php |
551
|
|
|
* $cfg['Export']['latex_data_caption'] = 'strLatexContent'; |
552
|
|
|
* ``` |
553
|
|
|
*/ |
554
|
|
|
public string $latex_data_caption; |
555
|
|
|
|
556
|
|
|
/** |
557
|
|
|
* ```php |
558
|
|
|
* $cfg['Export']['latex_data_continued_caption'] = 'strLatexContent strLatexContinued'; |
559
|
|
|
* ``` |
560
|
|
|
*/ |
561
|
|
|
public string $latex_data_continued_caption; |
562
|
|
|
|
563
|
|
|
/** |
564
|
|
|
* ```php |
565
|
|
|
* $cfg['Export']['latex_data_label'] = 'tab:@TABLE@-data'; |
566
|
|
|
* ``` |
567
|
|
|
*/ |
568
|
|
|
public string $latex_data_label; |
569
|
|
|
|
570
|
|
|
/** |
571
|
|
|
* ```php |
572
|
|
|
* $cfg['Export']['latex_structure_label'] = 'tab:@TABLE@-structure'; |
573
|
|
|
* ``` |
574
|
|
|
*/ |
575
|
|
|
public string $latex_structure_label; |
576
|
|
|
|
577
|
|
|
/** |
578
|
|
|
* ```php |
579
|
|
|
* $cfg['Export']['mediawiki_structure_or_data'] = 'data'; |
580
|
|
|
* ``` |
581
|
|
|
* |
582
|
|
|
* @psalm-var StructureOrDataType |
583
|
|
|
*/ |
584
|
|
|
public string $mediawiki_structure_or_data; |
585
|
|
|
|
586
|
|
|
/** |
587
|
|
|
* ```php |
588
|
|
|
* $cfg['Export']['mediawiki_caption'] = true; |
589
|
|
|
* ``` |
590
|
|
|
*/ |
591
|
|
|
public bool $mediawiki_caption; |
592
|
|
|
|
593
|
|
|
/** |
594
|
|
|
* ```php |
595
|
|
|
* $cfg['Export']['mediawiki_headers'] = true; |
596
|
|
|
* ``` |
597
|
|
|
*/ |
598
|
|
|
public bool $mediawiki_headers; |
599
|
|
|
|
600
|
|
|
/** |
601
|
|
|
* ```php |
602
|
|
|
* $cfg['Export']['ods_structure_or_data'] = 'data'; |
603
|
|
|
* ``` |
604
|
|
|
* |
605
|
|
|
* @psalm-var StructureOrDataType |
606
|
|
|
*/ |
607
|
|
|
public string $ods_structure_or_data; |
608
|
|
|
|
609
|
|
|
/** |
610
|
|
|
* ```php |
611
|
|
|
* $cfg['Export']['pdf_structure_or_data'] = 'data'; |
612
|
|
|
* ``` |
613
|
|
|
* |
614
|
|
|
* @psalm-var StructureOrDataType |
615
|
|
|
*/ |
616
|
|
|
public string $pdf_structure_or_data; |
617
|
|
|
|
618
|
|
|
/** |
619
|
|
|
* ```php |
620
|
|
|
* $cfg['Export']['phparray_structure_or_data'] = 'data'; |
621
|
|
|
* ``` |
622
|
|
|
* |
623
|
|
|
* @psalm-var StructureOrDataType |
624
|
|
|
*/ |
625
|
|
|
public string $phparray_structure_or_data; |
626
|
|
|
|
627
|
|
|
/** |
628
|
|
|
* ```php |
629
|
|
|
* $cfg['Export']['json_structure_or_data'] = 'data'; |
630
|
|
|
* ``` |
631
|
|
|
* |
632
|
|
|
* @psalm-var StructureOrDataType |
633
|
|
|
*/ |
634
|
|
|
public string $json_structure_or_data; |
635
|
|
|
|
636
|
|
|
/** |
637
|
|
|
* ```php |
638
|
|
|
* $cfg['Export']['json_pretty_print'] = false; |
639
|
|
|
* ``` |
640
|
|
|
*/ |
641
|
|
|
public bool $json_pretty_print; |
642
|
|
|
|
643
|
|
|
/** |
644
|
|
|
* ```php |
645
|
|
|
* $cfg['Export']['json_unicode'] = true; |
646
|
|
|
* ``` |
647
|
|
|
*/ |
648
|
|
|
public bool $json_unicode; |
649
|
|
|
|
650
|
|
|
/** |
651
|
|
|
* ```php |
652
|
|
|
* $cfg['Export']['sql_structure_or_data'] = 'structure_and_data'; |
653
|
|
|
* ``` |
654
|
|
|
* |
655
|
|
|
* @psalm-var StructureOrDataType |
656
|
|
|
*/ |
657
|
|
|
public string $sql_structure_or_data; |
658
|
|
|
|
659
|
|
|
/** |
660
|
|
|
* ```php |
661
|
|
|
* $cfg['Export']['sql_compatibility'] = 'NONE'; |
662
|
|
|
* ``` |
663
|
|
|
* |
664
|
|
|
* @psalm-var 'NONE'|'ANSI'|'DB2'|'MAXDB'|'MYSQL323'|'MYSQL40'|'MSSQL'|'ORACLE'|'TRADITIONAL' |
665
|
|
|
*/ |
666
|
|
|
public string $sql_compatibility; |
667
|
|
|
|
668
|
|
|
/** |
669
|
|
|
* Whether to include comments in SQL export. |
670
|
|
|
* |
671
|
|
|
* ```php |
672
|
|
|
* $cfg['Export']['sql_include_comments'] = true; |
673
|
|
|
* ``` |
674
|
|
|
*/ |
675
|
|
|
public bool $sql_include_comments; |
676
|
|
|
|
677
|
|
|
/** |
678
|
|
|
* ```php |
679
|
|
|
* $cfg['Export']['sql_disable_fk'] = false; |
680
|
|
|
* ``` |
681
|
|
|
*/ |
682
|
|
|
public bool $sql_disable_fk; |
683
|
|
|
|
684
|
|
|
/** |
685
|
|
|
* ```php |
686
|
|
|
* $cfg['Export']['sql_views_as_tables'] = false; |
687
|
|
|
* ``` |
688
|
|
|
*/ |
689
|
|
|
public bool $sql_views_as_tables; |
690
|
|
|
|
691
|
|
|
/** |
692
|
|
|
* ```php |
693
|
|
|
* $cfg['Export']['sql_metadata'] = false; |
694
|
|
|
* ``` |
695
|
|
|
*/ |
696
|
|
|
public bool $sql_metadata; |
697
|
|
|
|
698
|
|
|
/** |
699
|
|
|
* ```php |
700
|
|
|
* $cfg['Export']['sql_use_transaction'] = true; |
701
|
|
|
* ``` |
702
|
|
|
*/ |
703
|
|
|
public bool $sql_use_transaction; |
704
|
|
|
|
705
|
|
|
/** |
706
|
|
|
* ```php |
707
|
|
|
* $cfg['Export']['sql_create_database'] = false; |
708
|
|
|
* ``` |
709
|
|
|
*/ |
710
|
|
|
public bool $sql_create_database; |
711
|
|
|
|
712
|
|
|
/** |
713
|
|
|
* ```php |
714
|
|
|
* $cfg['Export']['sql_drop_database'] = false; |
715
|
|
|
* ``` |
716
|
|
|
*/ |
717
|
|
|
public bool $sql_drop_database; |
718
|
|
|
|
719
|
|
|
/** |
720
|
|
|
* ```php |
721
|
|
|
* $cfg['Export']['sql_drop_table'] = false; |
722
|
|
|
* ``` |
723
|
|
|
*/ |
724
|
|
|
public bool $sql_drop_table; |
725
|
|
|
|
726
|
|
|
/** |
727
|
|
|
* true by default for correct behavior when dealing with exporting |
728
|
|
|
* of VIEWs and the stand-in table |
729
|
|
|
* |
730
|
|
|
* ```php |
731
|
|
|
* $cfg['Export']['sql_if_not_exists'] = false; |
732
|
|
|
* ``` |
733
|
|
|
*/ |
734
|
|
|
public bool $sql_if_not_exists; |
735
|
|
|
|
736
|
|
|
/** |
737
|
|
|
* ```php |
738
|
|
|
* $cfg['Export']['sql_view_current_user'] = false; |
739
|
|
|
* ``` |
740
|
|
|
*/ |
741
|
|
|
public bool $sql_view_current_user; |
742
|
|
|
|
743
|
|
|
/** |
744
|
|
|
* ```php |
745
|
|
|
* $cfg['Export']['sql_or_replace_view'] = false; |
746
|
|
|
* ``` |
747
|
|
|
*/ |
748
|
|
|
public bool $sql_or_replace_view; |
749
|
|
|
|
750
|
|
|
/** |
751
|
|
|
* ```php |
752
|
|
|
* $cfg['Export']['sql_procedure_function'] = true; |
753
|
|
|
* ``` |
754
|
|
|
*/ |
755
|
|
|
public bool $sql_procedure_function; |
756
|
|
|
|
757
|
|
|
/** |
758
|
|
|
* ```php |
759
|
|
|
* $cfg['Export']['sql_create_table'] = true; |
760
|
|
|
* ``` |
761
|
|
|
*/ |
762
|
|
|
public bool $sql_create_table; |
763
|
|
|
|
764
|
|
|
/** |
765
|
|
|
* ```php |
766
|
|
|
* $cfg['Export']['sql_create_view'] = true; |
767
|
|
|
* ``` |
768
|
|
|
*/ |
769
|
|
|
public bool $sql_create_view; |
770
|
|
|
|
771
|
|
|
/** |
772
|
|
|
* ```php |
773
|
|
|
* $cfg['Export']['sql_create_trigger'] = true; |
774
|
|
|
* ``` |
775
|
|
|
*/ |
776
|
|
|
public bool $sql_create_trigger; |
777
|
|
|
|
778
|
|
|
/** |
779
|
|
|
* ```php |
780
|
|
|
* $cfg['Export']['sql_auto_increment'] = true; |
781
|
|
|
* ``` |
782
|
|
|
*/ |
783
|
|
|
public bool $sql_auto_increment; |
784
|
|
|
|
785
|
|
|
/** |
786
|
|
|
* ```php |
787
|
|
|
* $cfg['Export']['sql_backquotes'] = true; |
788
|
|
|
* ``` |
789
|
|
|
*/ |
790
|
|
|
public bool $sql_backquotes; |
791
|
|
|
|
792
|
|
|
/** |
793
|
|
|
* ```php |
794
|
|
|
* $cfg['Export']['sql_dates'] = false; |
795
|
|
|
* ``` |
796
|
|
|
*/ |
797
|
|
|
public bool $sql_dates; |
798
|
|
|
|
799
|
|
|
/** |
800
|
|
|
* ```php |
801
|
|
|
* $cfg['Export']['sql_relation'] = false; |
802
|
|
|
* ``` |
803
|
|
|
*/ |
804
|
|
|
public bool $sql_relation; |
805
|
|
|
|
806
|
|
|
/** |
807
|
|
|
* ```php |
808
|
|
|
* $cfg['Export']['sql_truncate'] = false; |
809
|
|
|
* ``` |
810
|
|
|
*/ |
811
|
|
|
public bool $sql_truncate; |
812
|
|
|
|
813
|
|
|
/** |
814
|
|
|
* ```php |
815
|
|
|
* $cfg['Export']['sql_delayed'] = false; |
816
|
|
|
* ``` |
817
|
|
|
*/ |
818
|
|
|
public bool $sql_delayed; |
819
|
|
|
|
820
|
|
|
/** |
821
|
|
|
* ```php |
822
|
|
|
* $cfg['Export']['sql_ignore'] = false; |
823
|
|
|
* ``` |
824
|
|
|
*/ |
825
|
|
|
public bool $sql_ignore; |
826
|
|
|
|
827
|
|
|
/** |
828
|
|
|
* Export time in UTC. |
829
|
|
|
* |
830
|
|
|
* ```php |
831
|
|
|
* $cfg['Export']['sql_utc_time'] = true; |
832
|
|
|
* ``` |
833
|
|
|
*/ |
834
|
|
|
public bool $sql_utc_time; |
835
|
|
|
|
836
|
|
|
/** |
837
|
|
|
* ```php |
838
|
|
|
* $cfg['Export']['sql_hex_for_binary'] = true; |
839
|
|
|
* ``` |
840
|
|
|
*/ |
841
|
|
|
public bool $sql_hex_for_binary; |
842
|
|
|
|
843
|
|
|
/** |
844
|
|
|
* ```php |
845
|
|
|
* $cfg['Export']['sql_type'] = 'INSERT'; |
846
|
|
|
* ``` |
847
|
|
|
* |
848
|
|
|
* @psalm-var 'INSERT'|'UPDATE'|'REPLACE' |
849
|
|
|
*/ |
850
|
|
|
public string $sql_type; |
851
|
|
|
|
852
|
|
|
/** |
853
|
|
|
* ```php |
854
|
|
|
* $cfg['Export']['sql_max_query_size'] = 50000; |
855
|
|
|
* ``` |
856
|
|
|
* |
857
|
|
|
* @psalm-var 0|positive-int |
858
|
|
|
*/ |
859
|
|
|
public int $sql_max_query_size; |
860
|
|
|
|
861
|
|
|
/** |
862
|
|
|
* ```php |
863
|
|
|
* $cfg['Export']['sql_mime'] = false; |
864
|
|
|
* ``` |
865
|
|
|
*/ |
866
|
|
|
public bool $sql_mime; |
867
|
|
|
|
868
|
|
|
/** |
869
|
|
|
* \n is replaced by new line |
870
|
|
|
* |
871
|
|
|
* ```php |
872
|
|
|
* $cfg['Export']['sql_header_comment'] = ''; |
873
|
|
|
* ``` |
874
|
|
|
*/ |
875
|
|
|
public string $sql_header_comment; |
876
|
|
|
|
877
|
|
|
/** |
878
|
|
|
* Whether to use complete inserts, extended inserts, both, or neither |
879
|
|
|
* |
880
|
|
|
* ```php |
881
|
|
|
* $cfg['Export']['sql_insert_syntax'] = 'both'; |
882
|
|
|
* ``` |
883
|
|
|
* |
884
|
|
|
* @psalm-var 'complete'|'extended'|'both'|'none' |
885
|
|
|
*/ |
886
|
|
|
public string $sql_insert_syntax; |
887
|
|
|
|
888
|
|
|
/** |
889
|
|
|
* ```php |
890
|
|
|
* $cfg['Export']['pdf_report_title'] = ''; |
891
|
|
|
* ``` |
892
|
|
|
*/ |
893
|
|
|
public string $pdf_report_title; |
894
|
|
|
|
895
|
|
|
/** |
896
|
|
|
* ```php |
897
|
|
|
* $cfg['Export']['xml_structure_or_data'] = 'data'; |
898
|
|
|
* ``` |
899
|
|
|
* |
900
|
|
|
* @psalm-var StructureOrDataType |
901
|
|
|
*/ |
902
|
|
|
public string $xml_structure_or_data; |
903
|
|
|
|
904
|
|
|
/** |
905
|
|
|
* Export schema for each structure |
906
|
|
|
* |
907
|
|
|
* ```php |
908
|
|
|
* $cfg['Export']['xml_export_struc'] = true; |
909
|
|
|
* ``` |
910
|
|
|
*/ |
911
|
|
|
public bool $xml_export_struc; |
912
|
|
|
|
913
|
|
|
/** |
914
|
|
|
* Export events |
915
|
|
|
* |
916
|
|
|
* ```php |
917
|
|
|
* $cfg['Export']['xml_export_events'] = true; |
918
|
|
|
* ``` |
919
|
|
|
*/ |
920
|
|
|
public bool $xml_export_events; |
921
|
|
|
|
922
|
|
|
/** |
923
|
|
|
* Export functions |
924
|
|
|
* |
925
|
|
|
* ```php |
926
|
|
|
* $cfg['Export']['xml_export_functions'] = true; |
927
|
|
|
* ``` |
928
|
|
|
*/ |
929
|
|
|
public bool $xml_export_functions; |
930
|
|
|
|
931
|
|
|
/** |
932
|
|
|
* Export procedures |
933
|
|
|
* |
934
|
|
|
* ```php |
935
|
|
|
* $cfg['Export']['xml_export_procedures'] = true; |
936
|
|
|
* ``` |
937
|
|
|
*/ |
938
|
|
|
public bool $xml_export_procedures; |
939
|
|
|
|
940
|
|
|
/** |
941
|
|
|
* Export schema for each table |
942
|
|
|
* |
943
|
|
|
* ```php |
944
|
|
|
* $cfg['Export']['xml_export_tables'] = true; |
945
|
|
|
* ``` |
946
|
|
|
*/ |
947
|
|
|
public bool $xml_export_tables; |
948
|
|
|
|
949
|
|
|
/** |
950
|
|
|
* Export triggers |
951
|
|
|
* |
952
|
|
|
* ```php |
953
|
|
|
* $cfg['Export']['xml_export_triggers'] = true; |
954
|
|
|
* ``` |
955
|
|
|
*/ |
956
|
|
|
public bool $xml_export_triggers; |
957
|
|
|
|
958
|
|
|
/** |
959
|
|
|
* Export views |
960
|
|
|
* |
961
|
|
|
* ```php |
962
|
|
|
* $cfg['Export']['xml_export_views'] = true; |
963
|
|
|
* ``` |
964
|
|
|
*/ |
965
|
|
|
public bool $xml_export_views; |
966
|
|
|
|
967
|
|
|
/** |
968
|
|
|
* Export contents data |
969
|
|
|
* |
970
|
|
|
* ```php |
971
|
|
|
* $cfg['Export']['xml_export_contents'] = true; |
972
|
|
|
* ``` |
973
|
|
|
*/ |
974
|
|
|
public bool $xml_export_contents; |
975
|
|
|
|
976
|
|
|
/** |
977
|
|
|
* ```php |
978
|
|
|
* $cfg['Export']['yaml_structure_or_data'] = 'data'; |
979
|
|
|
* ``` |
980
|
|
|
* |
981
|
|
|
* @psalm-var StructureOrDataType |
982
|
|
|
*/ |
983
|
|
|
public string $yaml_structure_or_data; |
984
|
|
|
|
985
|
|
|
/** |
986
|
|
|
* ```php |
987
|
|
|
* $cfg['Export']['remove_definer_from_definitions'] = false; |
988
|
|
|
* ``` |
989
|
|
|
*/ |
990
|
|
|
public bool $remove_definer_from_definitions; |
991
|
|
|
|
992
|
|
|
/** @param array<int|string, mixed> $export */ |
993
|
2508 |
|
public function __construct(array $export = []) |
994
|
|
|
{ |
995
|
2508 |
|
$this->format = $this->setFormat($export); |
996
|
2508 |
|
$this->method = $this->setMethod($export); |
997
|
2508 |
|
$this->compression = $this->setCompression($export); |
998
|
2508 |
|
$this->lock_tables = $this->setLockTables($export); |
999
|
2508 |
|
$this->as_separate_files = $this->setAsSeparateFiles($export); |
1000
|
2508 |
|
$this->asfile = $this->setAsFile($export); |
1001
|
2508 |
|
$this->charset = $this->setCharset($export); |
1002
|
2508 |
|
$this->onserver = $this->setOnServer($export); |
1003
|
2508 |
|
$this->onserver_overwrite = $this->setOnServerOverwrite($export); |
1004
|
2508 |
|
$this->quick_export_onserver = $this->setQuickExportOnServer($export); |
1005
|
2508 |
|
$this->quick_export_onserver_overwrite = $this->setQuickExportOnServerOverwrite($export); |
1006
|
2508 |
|
$this->remember_file_template = $this->setRememberFileTemplate($export); |
1007
|
2508 |
|
$this->file_template_table = $this->setFileTemplateTable($export); |
1008
|
2508 |
|
$this->file_template_database = $this->setFileTemplateDatabase($export); |
1009
|
2508 |
|
$this->file_template_server = $this->setFileTemplateServer($export); |
1010
|
2508 |
|
$this->codegen_structure_or_data = $this->setCodegenStructureOrData($export); |
1011
|
2508 |
|
$this->codegen_format = $this->setCodegenFormat($export); |
1012
|
2508 |
|
$this->ods_columns = $this->setOdsColumns($export); |
1013
|
2508 |
|
$this->ods_null = $this->setOdsNull($export); |
1014
|
2508 |
|
$this->odt_structure_or_data = $this->setOdtStructureOrData($export); |
1015
|
2508 |
|
$this->odt_columns = $this->setOdtColumns($export); |
1016
|
2508 |
|
$this->odt_relation = $this->setOdtRelation($export); |
1017
|
2508 |
|
$this->odt_comments = $this->setOdtComments($export); |
1018
|
2508 |
|
$this->odt_mime = $this->setOdtMime($export); |
1019
|
2508 |
|
$this->odt_null = $this->setOdtNull($export); |
1020
|
2508 |
|
$this->htmlword_structure_or_data = $this->setHtmlwordStructureOrData($export); |
1021
|
2508 |
|
$this->htmlword_columns = $this->setHtmlwordColumns($export); |
1022
|
2508 |
|
$this->htmlword_null = $this->setHtmlwordNull($export); |
1023
|
2508 |
|
$this->texytext_structure_or_data = $this->setTexytextStructureOrData($export); |
1024
|
2508 |
|
$this->texytext_columns = $this->setTexytextColumns($export); |
1025
|
2508 |
|
$this->texytext_null = $this->setTexytextNull($export); |
1026
|
2508 |
|
$this->csv_columns = $this->setCsvColumns($export); |
1027
|
2508 |
|
$this->csv_structure_or_data = $this->setCsvStructureOrData($export); |
1028
|
2508 |
|
$this->csv_null = $this->setCsvNull($export); |
1029
|
2508 |
|
$this->csv_separator = $this->setCsvSeparator($export); |
1030
|
2508 |
|
$this->csv_enclosed = $this->setCsvEnclosed($export); |
1031
|
2508 |
|
$this->csv_escaped = $this->setCsvEscaped($export); |
1032
|
2508 |
|
$this->csv_terminated = $this->setCsvTerminated($export); |
1033
|
2508 |
|
$this->csv_removeCRLF = $this->setCsvRemoveCRLF($export); |
1034
|
2508 |
|
$this->excel_columns = $this->setExcelColumns($export); |
1035
|
2508 |
|
$this->excel_null = $this->setExcelNull($export); |
1036
|
2508 |
|
$this->excel_edition = $this->setExcelEdition($export); |
1037
|
2508 |
|
$this->excel_removeCRLF = $this->setExcelRemoveCRLF($export); |
1038
|
2508 |
|
$this->excel_structure_or_data = $this->setExcelStructureOrData($export); |
1039
|
2508 |
|
$this->latex_structure_or_data = $this->setLatexStructureOrData($export); |
1040
|
2508 |
|
$this->latex_columns = $this->setLatexColumns($export); |
1041
|
2508 |
|
$this->latex_relation = $this->setLatexRelation($export); |
1042
|
2508 |
|
$this->latex_comments = $this->setLatexComments($export); |
1043
|
2508 |
|
$this->latex_mime = $this->setLatexMime($export); |
1044
|
2508 |
|
$this->latex_null = $this->setLatexNull($export); |
1045
|
2508 |
|
$this->latex_caption = $this->setLatexCaption($export); |
1046
|
2508 |
|
$this->latex_structure_caption = $this->setLatexStructureCaption($export); |
1047
|
2508 |
|
$this->latex_structure_continued_caption = $this->setLatexStructureContinuedCaption($export); |
1048
|
2508 |
|
$this->latex_data_caption = $this->setLatexDataCaption($export); |
1049
|
2508 |
|
$this->latex_data_continued_caption = $this->setLatexDataContinuedCaption($export); |
1050
|
2508 |
|
$this->latex_data_label = $this->setLatexDataLabel($export); |
1051
|
2508 |
|
$this->latex_structure_label = $this->setLatexStructureLabel($export); |
1052
|
2508 |
|
$this->mediawiki_structure_or_data = $this->setMediawikiStructureOrData($export); |
1053
|
2508 |
|
$this->mediawiki_caption = $this->setMediawikiCaption($export); |
1054
|
2508 |
|
$this->mediawiki_headers = $this->setMediawikiHeaders($export); |
1055
|
2508 |
|
$this->ods_structure_or_data = $this->setOdsStructureOrData($export); |
1056
|
2508 |
|
$this->pdf_structure_or_data = $this->setPdfStructureOrData($export); |
1057
|
2508 |
|
$this->phparray_structure_or_data = $this->setPhparrayStructureOrData($export); |
1058
|
2508 |
|
$this->json_structure_or_data = $this->setJsonStructureOrData($export); |
1059
|
2508 |
|
$this->json_pretty_print = $this->setJsonPrettyPrint($export); |
1060
|
2508 |
|
$this->json_unicode = $this->setJsonUnicode($export); |
1061
|
2508 |
|
$this->sql_structure_or_data = $this->setSqlStructureOrData($export); |
1062
|
2508 |
|
$this->sql_compatibility = $this->setSqlCompatibility($export); |
1063
|
2508 |
|
$this->sql_include_comments = $this->setSqlIncludeComments($export); |
1064
|
2508 |
|
$this->sql_disable_fk = $this->setSqlDisableFk($export); |
1065
|
2508 |
|
$this->sql_views_as_tables = $this->setSqlViewsAsTables($export); |
1066
|
2508 |
|
$this->sql_metadata = $this->setSqlMetadata($export); |
1067
|
2508 |
|
$this->sql_use_transaction = $this->setSqlUseTransaction($export); |
1068
|
2508 |
|
$this->sql_create_database = $this->setSqlCreateDatabase($export); |
1069
|
2508 |
|
$this->sql_drop_database = $this->setSqlDropDatabase($export); |
1070
|
2508 |
|
$this->sql_drop_table = $this->setSqlDropTable($export); |
1071
|
2508 |
|
$this->sql_if_not_exists = $this->setSqlIfNotExists($export); |
1072
|
2508 |
|
$this->sql_view_current_user = $this->setSqlViewCurrentUser($export); |
1073
|
2508 |
|
$this->sql_or_replace_view = $this->setSqlOrReplaceView($export); |
1074
|
2508 |
|
$this->sql_procedure_function = $this->setSqlProcedureFunction($export); |
1075
|
2508 |
|
$this->sql_create_table = $this->setSqlCreateTable($export); |
1076
|
2508 |
|
$this->sql_create_view = $this->setSqlCreateView($export); |
1077
|
2508 |
|
$this->sql_create_trigger = $this->setSqlCreateTrigger($export); |
1078
|
2508 |
|
$this->sql_auto_increment = $this->setSqlAutoIncrement($export); |
1079
|
2508 |
|
$this->sql_backquotes = $this->setSqlBackquotes($export); |
1080
|
2508 |
|
$this->sql_dates = $this->setSqlDates($export); |
1081
|
2508 |
|
$this->sql_relation = $this->setSqlRelation($export); |
1082
|
2508 |
|
$this->sql_truncate = $this->setSqlTruncate($export); |
1083
|
2508 |
|
$this->sql_delayed = $this->setSqlDelayed($export); |
1084
|
2508 |
|
$this->sql_ignore = $this->setSqlIgnore($export); |
1085
|
2508 |
|
$this->sql_utc_time = $this->setSqlUtcTime($export); |
1086
|
2508 |
|
$this->sql_hex_for_binary = $this->setSqlHexForBinary($export); |
1087
|
2508 |
|
$this->sql_type = $this->setSqlType($export); |
1088
|
2508 |
|
$this->sql_max_query_size = $this->setSqlMaxQuerySize($export); |
1089
|
2508 |
|
$this->sql_mime = $this->setSqlMime($export); |
1090
|
2508 |
|
$this->sql_header_comment = $this->setSqlHeaderComment($export); |
1091
|
2508 |
|
$this->sql_insert_syntax = $this->setSqlInsertSyntax($export); |
1092
|
2508 |
|
$this->pdf_report_title = $this->setPdfReportTitle($export); |
1093
|
2508 |
|
$this->xml_structure_or_data = $this->setXmlStructureOrData($export); |
1094
|
2508 |
|
$this->xml_export_struc = $this->setXmlExportStruc($export); |
1095
|
2508 |
|
$this->xml_export_events = $this->setXmlExportEvents($export); |
1096
|
2508 |
|
$this->xml_export_functions = $this->setXmlExportFunctions($export); |
1097
|
2508 |
|
$this->xml_export_procedures = $this->setXmlExportProcedures($export); |
1098
|
2508 |
|
$this->xml_export_tables = $this->setXmlExportTables($export); |
1099
|
2508 |
|
$this->xml_export_triggers = $this->setXmlExportTriggers($export); |
1100
|
2508 |
|
$this->xml_export_views = $this->setXmlExportViews($export); |
1101
|
2508 |
|
$this->xml_export_contents = $this->setXmlExportContents($export); |
1102
|
2508 |
|
$this->yaml_structure_or_data = $this->setYamlStructureOrData($export); |
1103
|
2508 |
|
$this->remove_definer_from_definitions = $this->setRemoveDefinerClause($export); |
1104
|
|
|
} |
1105
|
|
|
|
1106
|
|
|
/** @psalm-return ExportSettingsType */ |
1107
|
2508 |
|
public function asArray(): array |
1108
|
|
|
{ |
1109
|
2508 |
|
return [ |
1110
|
2508 |
|
'format' => $this->format, |
1111
|
2508 |
|
'method' => $this->method, |
1112
|
2508 |
|
'compression' => $this->compression, |
1113
|
2508 |
|
'lock_tables' => $this->lock_tables, |
1114
|
2508 |
|
'as_separate_files' => $this->as_separate_files, |
1115
|
2508 |
|
'asfile' => $this->asfile, |
1116
|
2508 |
|
'charset' => $this->charset, |
1117
|
2508 |
|
'onserver' => $this->onserver, |
1118
|
2508 |
|
'onserver_overwrite' => $this->onserver_overwrite, |
1119
|
2508 |
|
'quick_export_onserver' => $this->quick_export_onserver, |
1120
|
2508 |
|
'quick_export_onserver_overwrite' => $this->quick_export_onserver_overwrite, |
1121
|
2508 |
|
'remember_file_template' => $this->remember_file_template, |
1122
|
2508 |
|
'file_template_table' => $this->file_template_table, |
1123
|
2508 |
|
'file_template_database' => $this->file_template_database, |
1124
|
2508 |
|
'file_template_server' => $this->file_template_server, |
1125
|
2508 |
|
'codegen_structure_or_data' => $this->codegen_structure_or_data, |
1126
|
2508 |
|
'codegen_format' => $this->codegen_format, |
1127
|
2508 |
|
'ods_columns' => $this->ods_columns, |
1128
|
2508 |
|
'ods_null' => $this->ods_null, |
1129
|
2508 |
|
'odt_structure_or_data' => $this->odt_structure_or_data, |
1130
|
2508 |
|
'odt_columns' => $this->odt_columns, |
1131
|
2508 |
|
'odt_relation' => $this->odt_relation, |
1132
|
2508 |
|
'odt_comments' => $this->odt_comments, |
1133
|
2508 |
|
'odt_mime' => $this->odt_mime, |
1134
|
2508 |
|
'odt_null' => $this->odt_null, |
1135
|
2508 |
|
'htmlword_structure_or_data' => $this->htmlword_structure_or_data, |
1136
|
2508 |
|
'htmlword_columns' => $this->htmlword_columns, |
1137
|
2508 |
|
'htmlword_null' => $this->htmlword_null, |
1138
|
2508 |
|
'texytext_structure_or_data' => $this->texytext_structure_or_data, |
1139
|
2508 |
|
'texytext_columns' => $this->texytext_columns, |
1140
|
2508 |
|
'texytext_null' => $this->texytext_null, |
1141
|
2508 |
|
'csv_columns' => $this->csv_columns, |
1142
|
2508 |
|
'csv_structure_or_data' => $this->csv_structure_or_data, |
1143
|
2508 |
|
'csv_null' => $this->csv_null, |
1144
|
2508 |
|
'csv_separator' => $this->csv_separator, |
1145
|
2508 |
|
'csv_enclosed' => $this->csv_enclosed, |
1146
|
2508 |
|
'csv_escaped' => $this->csv_escaped, |
1147
|
2508 |
|
'csv_terminated' => $this->csv_terminated, |
1148
|
2508 |
|
'csv_removeCRLF' => $this->csv_removeCRLF, |
1149
|
2508 |
|
'excel_columns' => $this->excel_columns, |
1150
|
2508 |
|
'excel_null' => $this->excel_null, |
1151
|
2508 |
|
'excel_edition' => $this->excel_edition, |
1152
|
2508 |
|
'excel_removeCRLF' => $this->excel_removeCRLF, |
1153
|
2508 |
|
'excel_structure_or_data' => $this->excel_structure_or_data, |
1154
|
2508 |
|
'latex_structure_or_data' => $this->latex_structure_or_data, |
1155
|
2508 |
|
'latex_columns' => $this->latex_columns, |
1156
|
2508 |
|
'latex_relation' => $this->latex_relation, |
1157
|
2508 |
|
'latex_comments' => $this->latex_comments, |
1158
|
2508 |
|
'latex_mime' => $this->latex_mime, |
1159
|
2508 |
|
'latex_null' => $this->latex_null, |
1160
|
2508 |
|
'latex_caption' => $this->latex_caption, |
1161
|
2508 |
|
'latex_structure_caption' => $this->latex_structure_caption, |
1162
|
2508 |
|
'latex_structure_continued_caption' => $this->latex_structure_continued_caption, |
1163
|
2508 |
|
'latex_data_caption' => $this->latex_data_caption, |
1164
|
2508 |
|
'latex_data_continued_caption' => $this->latex_data_continued_caption, |
1165
|
2508 |
|
'latex_data_label' => $this->latex_data_label, |
1166
|
2508 |
|
'latex_structure_label' => $this->latex_structure_label, |
1167
|
2508 |
|
'mediawiki_structure_or_data' => $this->mediawiki_structure_or_data, |
1168
|
2508 |
|
'mediawiki_caption' => $this->mediawiki_caption, |
1169
|
2508 |
|
'mediawiki_headers' => $this->mediawiki_headers, |
1170
|
2508 |
|
'ods_structure_or_data' => $this->ods_structure_or_data, |
1171
|
2508 |
|
'pdf_structure_or_data' => $this->pdf_structure_or_data, |
1172
|
2508 |
|
'phparray_structure_or_data' => $this->phparray_structure_or_data, |
1173
|
2508 |
|
'json_structure_or_data' => $this->json_structure_or_data, |
1174
|
2508 |
|
'json_pretty_print' => $this->json_pretty_print, |
1175
|
2508 |
|
'json_unicode' => $this->json_unicode, |
1176
|
2508 |
|
'sql_structure_or_data' => $this->sql_structure_or_data, |
1177
|
2508 |
|
'sql_compatibility' => $this->sql_compatibility, |
1178
|
2508 |
|
'sql_include_comments' => $this->sql_include_comments, |
1179
|
2508 |
|
'sql_disable_fk' => $this->sql_disable_fk, |
1180
|
2508 |
|
'sql_views_as_tables' => $this->sql_views_as_tables, |
1181
|
2508 |
|
'sql_metadata' => $this->sql_metadata, |
1182
|
2508 |
|
'sql_use_transaction' => $this->sql_use_transaction, |
1183
|
2508 |
|
'sql_create_database' => $this->sql_create_database, |
1184
|
2508 |
|
'sql_drop_database' => $this->sql_drop_database, |
1185
|
2508 |
|
'sql_drop_table' => $this->sql_drop_table, |
1186
|
2508 |
|
'sql_if_not_exists' => $this->sql_if_not_exists, |
1187
|
2508 |
|
'sql_view_current_user' => $this->sql_view_current_user, |
1188
|
2508 |
|
'sql_or_replace_view' => $this->sql_or_replace_view, |
1189
|
2508 |
|
'sql_procedure_function' => $this->sql_procedure_function, |
1190
|
2508 |
|
'sql_create_table' => $this->sql_create_table, |
1191
|
2508 |
|
'sql_create_view' => $this->sql_create_view, |
1192
|
2508 |
|
'sql_create_trigger' => $this->sql_create_trigger, |
1193
|
2508 |
|
'sql_auto_increment' => $this->sql_auto_increment, |
1194
|
2508 |
|
'sql_backquotes' => $this->sql_backquotes, |
1195
|
2508 |
|
'sql_dates' => $this->sql_dates, |
1196
|
2508 |
|
'sql_relation' => $this->sql_relation, |
1197
|
2508 |
|
'sql_truncate' => $this->sql_truncate, |
1198
|
2508 |
|
'sql_delayed' => $this->sql_delayed, |
1199
|
2508 |
|
'sql_ignore' => $this->sql_ignore, |
1200
|
2508 |
|
'sql_utc_time' => $this->sql_utc_time, |
1201
|
2508 |
|
'sql_hex_for_binary' => $this->sql_hex_for_binary, |
1202
|
2508 |
|
'sql_type' => $this->sql_type, |
1203
|
2508 |
|
'sql_max_query_size' => $this->sql_max_query_size, |
1204
|
2508 |
|
'sql_mime' => $this->sql_mime, |
1205
|
2508 |
|
'sql_header_comment' => $this->sql_header_comment, |
1206
|
2508 |
|
'sql_insert_syntax' => $this->sql_insert_syntax, |
1207
|
2508 |
|
'pdf_report_title' => $this->pdf_report_title, |
1208
|
2508 |
|
'xml_structure_or_data' => $this->xml_structure_or_data, |
1209
|
2508 |
|
'xml_export_struc' => $this->xml_export_struc, |
1210
|
2508 |
|
'xml_export_events' => $this->xml_export_events, |
1211
|
2508 |
|
'xml_export_functions' => $this->xml_export_functions, |
1212
|
2508 |
|
'xml_export_procedures' => $this->xml_export_procedures, |
1213
|
2508 |
|
'xml_export_tables' => $this->xml_export_tables, |
1214
|
2508 |
|
'xml_export_triggers' => $this->xml_export_triggers, |
1215
|
2508 |
|
'xml_export_views' => $this->xml_export_views, |
1216
|
2508 |
|
'xml_export_contents' => $this->xml_export_contents, |
1217
|
2508 |
|
'yaml_structure_or_data' => $this->yaml_structure_or_data, |
1218
|
2508 |
|
'remove_definer_from_definitions' => $this->remove_definer_from_definitions, |
1219
|
2508 |
|
]; |
1220
|
|
|
} |
1221
|
|
|
|
1222
|
|
|
/** |
1223
|
|
|
* @param array<int|string, mixed> $export |
1224
|
|
|
* |
1225
|
|
|
* @psalm-return 'codegen'|'csv'|'excel'|'htmlexcel'|'htmlword'|'latex'|'ods'|'odt'|'pdf'|'sql'|'texytext'|'xml'|'yaml' |
1226
|
|
|
*/ |
1227
|
2508 |
|
private function setFormat(array $export): string |
1228
|
|
|
{ |
1229
|
|
|
if ( |
1230
|
2508 |
|
! isset($export['format']) || ! in_array($export['format'], [ |
1231
|
2508 |
|
'codegen', |
1232
|
2508 |
|
'csv', |
1233
|
2508 |
|
'excel', |
1234
|
2508 |
|
'htmlexcel', |
1235
|
2508 |
|
'htmlword', |
1236
|
2508 |
|
'latex', |
1237
|
2508 |
|
'ods', |
1238
|
2508 |
|
'odt', |
1239
|
2508 |
|
'pdf', |
1240
|
2508 |
|
'texytext', |
1241
|
2508 |
|
'xml', |
1242
|
2508 |
|
'yaml', |
1243
|
2508 |
|
], true) |
1244
|
|
|
) { |
1245
|
2460 |
|
return 'sql'; |
1246
|
|
|
} |
1247
|
|
|
|
1248
|
48 |
|
return $export['format']; |
1249
|
|
|
} |
1250
|
|
|
|
1251
|
|
|
/** |
1252
|
|
|
* @param array<int|string, mixed> $export |
1253
|
|
|
* |
1254
|
|
|
* @psalm-return 'quick'|'custom'|'custom-no-form' |
1255
|
|
|
*/ |
1256
|
2508 |
|
private function setMethod(array $export): string |
1257
|
|
|
{ |
1258
|
2508 |
|
if (! isset($export['method']) || ! in_array($export['method'], ['custom', 'custom-no-form'], true)) { |
1259
|
2500 |
|
return 'quick'; |
1260
|
|
|
} |
1261
|
|
|
|
1262
|
8 |
|
return $export['method']; |
1263
|
|
|
} |
1264
|
|
|
|
1265
|
|
|
/** |
1266
|
|
|
* @param array<int|string, mixed> $export |
1267
|
|
|
* |
1268
|
|
|
* @psalm-return 'none'|'zip'|'gzip' |
1269
|
|
|
*/ |
1270
|
2508 |
|
private function setCompression(array $export): string |
1271
|
|
|
{ |
1272
|
2508 |
|
if (! isset($export['compression']) || ! in_array($export['compression'], ['zip', 'gzip'], true)) { |
1273
|
2500 |
|
return 'none'; |
1274
|
|
|
} |
1275
|
|
|
|
1276
|
8 |
|
return $export['compression']; |
1277
|
|
|
} |
1278
|
|
|
|
1279
|
|
|
/** @param array<int|string, mixed> $export */ |
1280
|
2508 |
|
private function setLockTables(array $export): bool |
1281
|
|
|
{ |
1282
|
2508 |
|
if (! isset($export['lock_tables'])) { |
1283
|
2496 |
|
return false; |
1284
|
|
|
} |
1285
|
|
|
|
1286
|
12 |
|
return (bool) $export['lock_tables']; |
1287
|
|
|
} |
1288
|
|
|
|
1289
|
|
|
/** @param array<int|string, mixed> $export */ |
1290
|
2508 |
|
private function setAsSeparateFiles(array $export): bool |
1291
|
|
|
{ |
1292
|
2508 |
|
if (! isset($export['as_separate_files'])) { |
1293
|
2496 |
|
return false; |
1294
|
|
|
} |
1295
|
|
|
|
1296
|
12 |
|
return (bool) $export['as_separate_files']; |
1297
|
|
|
} |
1298
|
|
|
|
1299
|
|
|
/** @param array<int|string, mixed> $export */ |
1300
|
2508 |
|
private function setAsFile(array $export): bool |
1301
|
|
|
{ |
1302
|
2508 |
|
if (! isset($export['asfile'])) { |
1303
|
2496 |
|
return true; |
1304
|
|
|
} |
1305
|
|
|
|
1306
|
12 |
|
return (bool) $export['asfile']; |
1307
|
|
|
} |
1308
|
|
|
|
1309
|
|
|
/** @param array<int|string, mixed> $export */ |
1310
|
2508 |
|
private function setCharset(array $export): string |
1311
|
|
|
{ |
1312
|
2508 |
|
if (! isset($export['charset'])) { |
1313
|
2496 |
|
return ''; |
1314
|
|
|
} |
1315
|
|
|
|
1316
|
12 |
|
return (string) $export['charset']; |
1317
|
|
|
} |
1318
|
|
|
|
1319
|
|
|
/** @param array<int|string, mixed> $export */ |
1320
|
2508 |
|
private function setOnServer(array $export): bool |
1321
|
|
|
{ |
1322
|
2508 |
|
if (! isset($export['onserver'])) { |
1323
|
2496 |
|
return false; |
1324
|
|
|
} |
1325
|
|
|
|
1326
|
12 |
|
return (bool) $export['onserver']; |
1327
|
|
|
} |
1328
|
|
|
|
1329
|
|
|
/** @param array<int|string, mixed> $export */ |
1330
|
2508 |
|
private function setOnServerOverwrite(array $export): bool |
1331
|
|
|
{ |
1332
|
2508 |
|
if (! isset($export['onserver_overwrite'])) { |
1333
|
2496 |
|
return false; |
1334
|
|
|
} |
1335
|
|
|
|
1336
|
12 |
|
return (bool) $export['onserver_overwrite']; |
1337
|
|
|
} |
1338
|
|
|
|
1339
|
|
|
/** @param array<int|string, mixed> $export */ |
1340
|
2508 |
|
private function setQuickExportOnServer(array $export): bool |
1341
|
|
|
{ |
1342
|
2508 |
|
if (! isset($export['quick_export_onserver'])) { |
1343
|
2496 |
|
return false; |
1344
|
|
|
} |
1345
|
|
|
|
1346
|
12 |
|
return (bool) $export['quick_export_onserver']; |
1347
|
|
|
} |
1348
|
|
|
|
1349
|
|
|
/** @param array<int|string, mixed> $export */ |
1350
|
2508 |
|
private function setQuickExportOnServerOverwrite(array $export): bool |
1351
|
|
|
{ |
1352
|
2508 |
|
if (! isset($export['quick_export_onserver_overwrite'])) { |
1353
|
2496 |
|
return false; |
1354
|
|
|
} |
1355
|
|
|
|
1356
|
12 |
|
return (bool) $export['quick_export_onserver_overwrite']; |
1357
|
|
|
} |
1358
|
|
|
|
1359
|
|
|
/** @param array<int|string, mixed> $export */ |
1360
|
2508 |
|
private function setRememberFileTemplate(array $export): bool |
1361
|
|
|
{ |
1362
|
2508 |
|
if (! isset($export['remember_file_template'])) { |
1363
|
2496 |
|
return true; |
1364
|
|
|
} |
1365
|
|
|
|
1366
|
12 |
|
return (bool) $export['remember_file_template']; |
1367
|
|
|
} |
1368
|
|
|
|
1369
|
|
|
/** @param array<int|string, mixed> $export */ |
1370
|
2508 |
|
private function setFileTemplateTable(array $export): string |
1371
|
|
|
{ |
1372
|
2508 |
|
if (! isset($export['file_template_table'])) { |
1373
|
2496 |
|
return '@TABLE@'; |
1374
|
|
|
} |
1375
|
|
|
|
1376
|
12 |
|
return (string) $export['file_template_table']; |
1377
|
|
|
} |
1378
|
|
|
|
1379
|
|
|
/** @param array<int|string, mixed> $export */ |
1380
|
2508 |
|
private function setFileTemplateDatabase(array $export): string |
1381
|
|
|
{ |
1382
|
2508 |
|
if (! isset($export['file_template_database'])) { |
1383
|
2496 |
|
return '@DATABASE@'; |
1384
|
|
|
} |
1385
|
|
|
|
1386
|
12 |
|
return (string) $export['file_template_database']; |
1387
|
|
|
} |
1388
|
|
|
|
1389
|
|
|
/** @param array<int|string, mixed> $export */ |
1390
|
2508 |
|
private function setFileTemplateServer(array $export): string |
1391
|
|
|
{ |
1392
|
2508 |
|
if (! isset($export['file_template_server'])) { |
1393
|
2496 |
|
return '@SERVER@'; |
1394
|
|
|
} |
1395
|
|
|
|
1396
|
12 |
|
return (string) $export['file_template_server']; |
1397
|
|
|
} |
1398
|
|
|
|
1399
|
|
|
/** |
1400
|
|
|
* @param array<int|string, mixed> $export |
1401
|
|
|
* |
1402
|
|
|
* @psalm-return StructureOrDataType |
1403
|
|
|
*/ |
1404
|
2508 |
|
private function setCodegenStructureOrData(array $export): string |
1405
|
|
|
{ |
1406
|
|
|
if ( |
1407
|
2508 |
|
! isset($export['codegen_structure_or_data']) |
1408
|
2508 |
|
|| ! in_array($export['codegen_structure_or_data'], ['structure', 'structure_and_data'], true) |
1409
|
|
|
) { |
1410
|
2500 |
|
return 'data'; |
1411
|
|
|
} |
1412
|
|
|
|
1413
|
8 |
|
return $export['codegen_structure_or_data']; |
1414
|
|
|
} |
1415
|
|
|
|
1416
|
|
|
/** |
1417
|
|
|
* @param array<int|string, mixed> $export |
1418
|
|
|
* |
1419
|
|
|
* @psalm-return 0|1 |
1420
|
|
|
*/ |
1421
|
2508 |
|
private function setCodegenFormat(array $export): int |
1422
|
|
|
{ |
1423
|
2508 |
|
if (! isset($export['codegen_format'])) { |
1424
|
2488 |
|
return 0; |
1425
|
|
|
} |
1426
|
|
|
|
1427
|
20 |
|
$codegenFormat = (int) $export['codegen_format']; |
1428
|
|
|
|
1429
|
20 |
|
return $codegenFormat === 1 ? 1 : 0; |
1430
|
|
|
} |
1431
|
|
|
|
1432
|
|
|
/** @param array<int|string, mixed> $export */ |
1433
|
2508 |
|
private function setOdsColumns(array $export): bool |
1434
|
|
|
{ |
1435
|
2508 |
|
if (! isset($export['ods_columns'])) { |
1436
|
2496 |
|
return false; |
1437
|
|
|
} |
1438
|
|
|
|
1439
|
12 |
|
return (bool) $export['ods_columns']; |
1440
|
|
|
} |
1441
|
|
|
|
1442
|
|
|
/** @param array<int|string, mixed> $export */ |
1443
|
2508 |
|
private function setOdsNull(array $export): string |
1444
|
|
|
{ |
1445
|
2508 |
|
if (! isset($export['ods_null'])) { |
1446
|
2496 |
|
return 'NULL'; |
1447
|
|
|
} |
1448
|
|
|
|
1449
|
12 |
|
return (string) $export['ods_null']; |
1450
|
|
|
} |
1451
|
|
|
|
1452
|
|
|
/** |
1453
|
|
|
* @param array<int|string, mixed> $export |
1454
|
|
|
* |
1455
|
|
|
* @psalm-return StructureOrDataType |
1456
|
|
|
*/ |
1457
|
2508 |
|
private function setOdtStructureOrData(array $export): string |
1458
|
|
|
{ |
1459
|
|
|
if ( |
1460
|
2508 |
|
! isset($export['odt_structure_or_data']) |
1461
|
2508 |
|
|| ! in_array($export['odt_structure_or_data'], ['structure', 'data'], true) |
1462
|
|
|
) { |
1463
|
2500 |
|
return 'structure_and_data'; |
1464
|
|
|
} |
1465
|
|
|
|
1466
|
8 |
|
return $export['odt_structure_or_data']; |
1467
|
|
|
} |
1468
|
|
|
|
1469
|
|
|
/** @param array<int|string, mixed> $export */ |
1470
|
2508 |
|
private function setOdtColumns(array $export): bool |
1471
|
|
|
{ |
1472
|
2508 |
|
if (! isset($export['odt_columns'])) { |
1473
|
2496 |
|
return true; |
1474
|
|
|
} |
1475
|
|
|
|
1476
|
12 |
|
return (bool) $export['odt_columns']; |
1477
|
|
|
} |
1478
|
|
|
|
1479
|
|
|
/** @param array<int|string, mixed> $export */ |
1480
|
2508 |
|
private function setOdtRelation(array $export): bool |
1481
|
|
|
{ |
1482
|
2508 |
|
if (! isset($export['odt_relation'])) { |
1483
|
2496 |
|
return true; |
1484
|
|
|
} |
1485
|
|
|
|
1486
|
12 |
|
return (bool) $export['odt_relation']; |
1487
|
|
|
} |
1488
|
|
|
|
1489
|
|
|
/** @param array<int|string, mixed> $export */ |
1490
|
2508 |
|
private function setOdtComments(array $export): bool |
1491
|
|
|
{ |
1492
|
2508 |
|
if (! isset($export['odt_comments'])) { |
1493
|
2496 |
|
return true; |
1494
|
|
|
} |
1495
|
|
|
|
1496
|
12 |
|
return (bool) $export['odt_comments']; |
1497
|
|
|
} |
1498
|
|
|
|
1499
|
|
|
/** @param array<int|string, mixed> $export */ |
1500
|
2508 |
|
private function setOdtMime(array $export): bool |
1501
|
|
|
{ |
1502
|
2508 |
|
if (! isset($export['odt_mime'])) { |
1503
|
2496 |
|
return true; |
1504
|
|
|
} |
1505
|
|
|
|
1506
|
12 |
|
return (bool) $export['odt_mime']; |
1507
|
|
|
} |
1508
|
|
|
|
1509
|
|
|
/** @param array<int|string, mixed> $export */ |
1510
|
2508 |
|
private function setOdtNull(array $export): string |
1511
|
|
|
{ |
1512
|
2508 |
|
if (! isset($export['odt_null'])) { |
1513
|
2496 |
|
return 'NULL'; |
1514
|
|
|
} |
1515
|
|
|
|
1516
|
12 |
|
return (string) $export['odt_null']; |
1517
|
|
|
} |
1518
|
|
|
|
1519
|
|
|
/** |
1520
|
|
|
* @param array<int|string, mixed> $export |
1521
|
|
|
* |
1522
|
|
|
* @psalm-return StructureOrDataType |
1523
|
|
|
*/ |
1524
|
2508 |
|
private function setHtmlwordStructureOrData(array $export): string |
1525
|
|
|
{ |
1526
|
|
|
if ( |
1527
|
2508 |
|
! isset($export['htmlword_structure_or_data']) |
1528
|
2508 |
|
|| ! in_array($export['htmlword_structure_or_data'], ['structure', 'data'], true) |
1529
|
|
|
) { |
1530
|
2500 |
|
return 'structure_and_data'; |
1531
|
|
|
} |
1532
|
|
|
|
1533
|
8 |
|
return $export['htmlword_structure_or_data']; |
1534
|
|
|
} |
1535
|
|
|
|
1536
|
|
|
/** @param array<int|string, mixed> $export */ |
1537
|
2508 |
|
private function setHtmlwordColumns(array $export): bool |
1538
|
|
|
{ |
1539
|
2508 |
|
if (! isset($export['htmlword_columns'])) { |
1540
|
2496 |
|
return false; |
1541
|
|
|
} |
1542
|
|
|
|
1543
|
12 |
|
return (bool) $export['htmlword_columns']; |
1544
|
|
|
} |
1545
|
|
|
|
1546
|
|
|
/** @param array<int|string, mixed> $export */ |
1547
|
2508 |
|
private function setHtmlwordNull(array $export): string |
1548
|
|
|
{ |
1549
|
2508 |
|
if (! isset($export['htmlword_null'])) { |
1550
|
2496 |
|
return 'NULL'; |
1551
|
|
|
} |
1552
|
|
|
|
1553
|
12 |
|
return (string) $export['htmlword_null']; |
1554
|
|
|
} |
1555
|
|
|
|
1556
|
|
|
/** |
1557
|
|
|
* @param array<int|string, mixed> $export |
1558
|
|
|
* |
1559
|
|
|
* @psalm-return StructureOrDataType |
1560
|
|
|
*/ |
1561
|
2508 |
|
private function setTexytextStructureOrData(array $export): string |
1562
|
|
|
{ |
1563
|
|
|
if ( |
1564
|
2508 |
|
! isset($export['texytext_structure_or_data']) |
1565
|
2508 |
|
|| ! in_array($export['texytext_structure_or_data'], ['structure', 'data'], true) |
1566
|
|
|
) { |
1567
|
2500 |
|
return 'structure_and_data'; |
1568
|
|
|
} |
1569
|
|
|
|
1570
|
8 |
|
return $export['texytext_structure_or_data']; |
1571
|
|
|
} |
1572
|
|
|
|
1573
|
|
|
/** @param array<int|string, mixed> $export */ |
1574
|
2508 |
|
private function setTexytextColumns(array $export): bool |
1575
|
|
|
{ |
1576
|
2508 |
|
if (! isset($export['texytext_columns'])) { |
1577
|
2496 |
|
return false; |
1578
|
|
|
} |
1579
|
|
|
|
1580
|
12 |
|
return (bool) $export['texytext_columns']; |
1581
|
|
|
} |
1582
|
|
|
|
1583
|
|
|
/** @param array<int|string, mixed> $export */ |
1584
|
2508 |
|
private function setTexytextNull(array $export): string |
1585
|
|
|
{ |
1586
|
2508 |
|
if (! isset($export['texytext_null'])) { |
1587
|
2496 |
|
return 'NULL'; |
1588
|
|
|
} |
1589
|
|
|
|
1590
|
12 |
|
return (string) $export['texytext_null']; |
1591
|
|
|
} |
1592
|
|
|
|
1593
|
|
|
/** @param array<int|string, mixed> $export */ |
1594
|
2508 |
|
private function setCsvColumns(array $export): bool |
1595
|
|
|
{ |
1596
|
2508 |
|
if (! isset($export['csv_columns'])) { |
1597
|
2496 |
|
return true; |
1598
|
|
|
} |
1599
|
|
|
|
1600
|
12 |
|
return (bool) $export['csv_columns']; |
1601
|
|
|
} |
1602
|
|
|
|
1603
|
|
|
/** |
1604
|
|
|
* @param array<int|string, mixed> $export |
1605
|
|
|
* |
1606
|
|
|
* @psalm-return StructureOrDataType |
1607
|
|
|
*/ |
1608
|
2508 |
|
private function setCsvStructureOrData(array $export): string |
1609
|
|
|
{ |
1610
|
|
|
if ( |
1611
|
2508 |
|
! isset($export['csv_structure_or_data']) |
1612
|
2508 |
|
|| ! in_array($export['csv_structure_or_data'], ['structure', 'structure_and_data'], true) |
1613
|
|
|
) { |
1614
|
2500 |
|
return 'data'; |
1615
|
|
|
} |
1616
|
|
|
|
1617
|
8 |
|
return $export['csv_structure_or_data']; |
1618
|
|
|
} |
1619
|
|
|
|
1620
|
|
|
/** @param array<int|string, mixed> $export */ |
1621
|
2508 |
|
private function setCsvNull(array $export): string |
1622
|
|
|
{ |
1623
|
2508 |
|
if (! isset($export['csv_null'])) { |
1624
|
2496 |
|
return 'NULL'; |
1625
|
|
|
} |
1626
|
|
|
|
1627
|
12 |
|
return (string) $export['csv_null']; |
1628
|
|
|
} |
1629
|
|
|
|
1630
|
|
|
/** @param array<int|string, mixed> $export */ |
1631
|
2508 |
|
private function setCsvSeparator(array $export): string |
1632
|
|
|
{ |
1633
|
2508 |
|
if (! isset($export['csv_separator'])) { |
1634
|
2496 |
|
return ','; |
1635
|
|
|
} |
1636
|
|
|
|
1637
|
12 |
|
return (string) $export['csv_separator']; |
1638
|
|
|
} |
1639
|
|
|
|
1640
|
|
|
/** @param array<int|string, mixed> $export */ |
1641
|
2508 |
|
private function setCsvEnclosed(array $export): string |
1642
|
|
|
{ |
1643
|
2508 |
|
if (! isset($export['csv_enclosed'])) { |
1644
|
2496 |
|
return '"'; |
1645
|
|
|
} |
1646
|
|
|
|
1647
|
12 |
|
return (string) $export['csv_enclosed']; |
1648
|
|
|
} |
1649
|
|
|
|
1650
|
|
|
/** @param array<int|string, mixed> $export */ |
1651
|
2508 |
|
private function setCsvEscaped(array $export): string |
1652
|
|
|
{ |
1653
|
2508 |
|
if (! isset($export['csv_escaped'])) { |
1654
|
2496 |
|
return '"'; |
1655
|
|
|
} |
1656
|
|
|
|
1657
|
12 |
|
return (string) $export['csv_escaped']; |
1658
|
|
|
} |
1659
|
|
|
|
1660
|
|
|
/** @param array<int|string, mixed> $export */ |
1661
|
2508 |
|
private function setCsvTerminated(array $export): string |
1662
|
|
|
{ |
1663
|
2508 |
|
if (! isset($export['csv_terminated'])) { |
1664
|
2496 |
|
return 'AUTO'; |
1665
|
|
|
} |
1666
|
|
|
|
1667
|
12 |
|
return (string) $export['csv_terminated']; |
1668
|
|
|
} |
1669
|
|
|
|
1670
|
|
|
/** @param array<int|string, mixed> $export */ |
1671
|
2508 |
|
private function setCsvRemoveCRLF(array $export): bool |
1672
|
|
|
{ |
1673
|
2508 |
|
if (! isset($export['csv_removeCRLF'])) { |
1674
|
2496 |
|
return false; |
1675
|
|
|
} |
1676
|
|
|
|
1677
|
12 |
|
return (bool) $export['csv_removeCRLF']; |
1678
|
|
|
} |
1679
|
|
|
|
1680
|
|
|
/** @param array<int|string, mixed> $export */ |
1681
|
2508 |
|
private function setExcelColumns(array $export): bool |
1682
|
|
|
{ |
1683
|
2508 |
|
if (! isset($export['excel_columns'])) { |
1684
|
2496 |
|
return true; |
1685
|
|
|
} |
1686
|
|
|
|
1687
|
12 |
|
return (bool) $export['excel_columns']; |
1688
|
|
|
} |
1689
|
|
|
|
1690
|
|
|
/** @param array<int|string, mixed> $export */ |
1691
|
2508 |
|
private function setExcelNull(array $export): string |
1692
|
|
|
{ |
1693
|
2508 |
|
if (! isset($export['excel_null'])) { |
1694
|
2496 |
|
return 'NULL'; |
1695
|
|
|
} |
1696
|
|
|
|
1697
|
12 |
|
return (string) $export['excel_null']; |
1698
|
|
|
} |
1699
|
|
|
|
1700
|
|
|
/** |
1701
|
|
|
* @param array<int|string, mixed> $export |
1702
|
|
|
* |
1703
|
|
|
* @psalm-return 'win'|'mac_excel2003'|'mac_excel2008' |
1704
|
|
|
*/ |
1705
|
2508 |
|
private function setExcelEdition(array $export): string |
1706
|
|
|
{ |
1707
|
|
|
if ( |
1708
|
2508 |
|
! isset($export['excel_edition']) |
1709
|
2508 |
|
|| ! in_array($export['excel_edition'], ['mac_excel2003', 'mac_excel2008'], true) |
1710
|
|
|
) { |
1711
|
2500 |
|
return 'win'; |
1712
|
|
|
} |
1713
|
|
|
|
1714
|
8 |
|
return $export['excel_edition']; |
1715
|
|
|
} |
1716
|
|
|
|
1717
|
|
|
/** @param array<int|string, mixed> $export */ |
1718
|
2508 |
|
private function setExcelRemoveCRLF(array $export): bool |
1719
|
|
|
{ |
1720
|
2508 |
|
if (! isset($export['excel_removeCRLF'])) { |
1721
|
2496 |
|
return false; |
1722
|
|
|
} |
1723
|
|
|
|
1724
|
12 |
|
return (bool) $export['excel_removeCRLF']; |
1725
|
|
|
} |
1726
|
|
|
|
1727
|
|
|
/** |
1728
|
|
|
* @param array<int|string, mixed> $export |
1729
|
|
|
* |
1730
|
|
|
* @psalm-return StructureOrDataType |
1731
|
|
|
*/ |
1732
|
2508 |
|
private function setExcelStructureOrData(array $export): string |
1733
|
|
|
{ |
1734
|
|
|
if ( |
1735
|
2508 |
|
! isset($export['excel_structure_or_data']) |
1736
|
2508 |
|
|| ! in_array($export['excel_structure_or_data'], ['structure', 'structure_and_data'], true) |
1737
|
|
|
) { |
1738
|
2500 |
|
return 'data'; |
1739
|
|
|
} |
1740
|
|
|
|
1741
|
8 |
|
return $export['excel_structure_or_data']; |
1742
|
|
|
} |
1743
|
|
|
|
1744
|
|
|
/** |
1745
|
|
|
* @param array<int|string, mixed> $export |
1746
|
|
|
* |
1747
|
|
|
* @psalm-return StructureOrDataType |
1748
|
|
|
*/ |
1749
|
2508 |
|
private function setLatexStructureOrData(array $export): string |
1750
|
|
|
{ |
1751
|
|
|
if ( |
1752
|
2508 |
|
! isset($export['latex_structure_or_data']) |
1753
|
2508 |
|
|| ! in_array($export['latex_structure_or_data'], ['structure', 'data'], true) |
1754
|
|
|
) { |
1755
|
2500 |
|
return 'structure_and_data'; |
1756
|
|
|
} |
1757
|
|
|
|
1758
|
8 |
|
return $export['latex_structure_or_data']; |
1759
|
|
|
} |
1760
|
|
|
|
1761
|
|
|
/** @param array<int|string, mixed> $export */ |
1762
|
2508 |
|
private function setLatexColumns(array $export): bool |
1763
|
|
|
{ |
1764
|
2508 |
|
if (! isset($export['latex_columns'])) { |
1765
|
2496 |
|
return true; |
1766
|
|
|
} |
1767
|
|
|
|
1768
|
12 |
|
return (bool) $export['latex_columns']; |
1769
|
|
|
} |
1770
|
|
|
|
1771
|
|
|
/** @param array<int|string, mixed> $export */ |
1772
|
2508 |
|
private function setLatexRelation(array $export): bool |
1773
|
|
|
{ |
1774
|
2508 |
|
if (! isset($export['latex_relation'])) { |
1775
|
2496 |
|
return true; |
1776
|
|
|
} |
1777
|
|
|
|
1778
|
12 |
|
return (bool) $export['latex_relation']; |
1779
|
|
|
} |
1780
|
|
|
|
1781
|
|
|
/** @param array<int|string, mixed> $export */ |
1782
|
2508 |
|
private function setLatexComments(array $export): bool |
1783
|
|
|
{ |
1784
|
2508 |
|
if (! isset($export['latex_comments'])) { |
1785
|
2496 |
|
return true; |
1786
|
|
|
} |
1787
|
|
|
|
1788
|
12 |
|
return (bool) $export['latex_comments']; |
1789
|
|
|
} |
1790
|
|
|
|
1791
|
|
|
/** @param array<int|string, mixed> $export */ |
1792
|
2508 |
|
private function setLatexMime(array $export): bool |
1793
|
|
|
{ |
1794
|
2508 |
|
if (! isset($export['latex_mime'])) { |
1795
|
2496 |
|
return true; |
1796
|
|
|
} |
1797
|
|
|
|
1798
|
12 |
|
return (bool) $export['latex_mime']; |
1799
|
|
|
} |
1800
|
|
|
|
1801
|
|
|
/** @param array<int|string, mixed> $export */ |
1802
|
2508 |
|
private function setLatexNull(array $export): string |
1803
|
|
|
{ |
1804
|
2508 |
|
if (! isset($export['latex_null'])) { |
1805
|
2496 |
|
return '\textit{NULL}'; |
1806
|
|
|
} |
1807
|
|
|
|
1808
|
12 |
|
return (string) $export['latex_null']; |
1809
|
|
|
} |
1810
|
|
|
|
1811
|
|
|
/** @param array<int|string, mixed> $export */ |
1812
|
2508 |
|
private function setLatexCaption(array $export): bool |
1813
|
|
|
{ |
1814
|
2508 |
|
if (! isset($export['latex_caption'])) { |
1815
|
2496 |
|
return true; |
1816
|
|
|
} |
1817
|
|
|
|
1818
|
12 |
|
return (bool) $export['latex_caption']; |
1819
|
|
|
} |
1820
|
|
|
|
1821
|
|
|
/** @param array<int|string, mixed> $export */ |
1822
|
2508 |
|
private function setLatexStructureCaption(array $export): string |
1823
|
|
|
{ |
1824
|
2508 |
|
if (! isset($export['latex_structure_caption'])) { |
1825
|
2496 |
|
return 'strLatexStructure'; |
1826
|
|
|
} |
1827
|
|
|
|
1828
|
12 |
|
return (string) $export['latex_structure_caption']; |
1829
|
|
|
} |
1830
|
|
|
|
1831
|
|
|
/** @param array<int|string, mixed> $export */ |
1832
|
2508 |
|
private function setLatexStructureContinuedCaption(array $export): string |
1833
|
|
|
{ |
1834
|
2508 |
|
if (! isset($export['latex_structure_continued_caption'])) { |
1835
|
2496 |
|
return 'strLatexStructure strLatexContinued'; |
1836
|
|
|
} |
1837
|
|
|
|
1838
|
12 |
|
return (string) $export['latex_structure_continued_caption']; |
1839
|
|
|
} |
1840
|
|
|
|
1841
|
|
|
/** @param array<int|string, mixed> $export */ |
1842
|
2508 |
|
private function setLatexDataCaption(array $export): string |
1843
|
|
|
{ |
1844
|
2508 |
|
if (! isset($export['latex_data_caption'])) { |
1845
|
2496 |
|
return 'strLatexContent'; |
1846
|
|
|
} |
1847
|
|
|
|
1848
|
12 |
|
return (string) $export['latex_data_caption']; |
1849
|
|
|
} |
1850
|
|
|
|
1851
|
|
|
/** @param array<int|string, mixed> $export */ |
1852
|
2508 |
|
private function setLatexDataContinuedCaption(array $export): string |
1853
|
|
|
{ |
1854
|
2508 |
|
if (! isset($export['latex_data_continued_caption'])) { |
1855
|
2496 |
|
return 'strLatexContent strLatexContinued'; |
1856
|
|
|
} |
1857
|
|
|
|
1858
|
12 |
|
return (string) $export['latex_data_continued_caption']; |
1859
|
|
|
} |
1860
|
|
|
|
1861
|
|
|
/** @param array<int|string, mixed> $export */ |
1862
|
2508 |
|
private function setLatexDataLabel(array $export): string |
1863
|
|
|
{ |
1864
|
2508 |
|
if (! isset($export['latex_data_label'])) { |
1865
|
2496 |
|
return 'tab:@TABLE@-data'; |
1866
|
|
|
} |
1867
|
|
|
|
1868
|
12 |
|
return (string) $export['latex_data_label']; |
1869
|
|
|
} |
1870
|
|
|
|
1871
|
|
|
/** @param array<int|string, mixed> $export */ |
1872
|
2508 |
|
private function setLatexStructureLabel(array $export): string |
1873
|
|
|
{ |
1874
|
2508 |
|
if (! isset($export['latex_structure_label'])) { |
1875
|
2496 |
|
return 'tab:@TABLE@-structure'; |
1876
|
|
|
} |
1877
|
|
|
|
1878
|
12 |
|
return (string) $export['latex_structure_label']; |
1879
|
|
|
} |
1880
|
|
|
|
1881
|
|
|
/** |
1882
|
|
|
* @param array<int|string, mixed> $export |
1883
|
|
|
* |
1884
|
|
|
* @psalm-return StructureOrDataType |
1885
|
|
|
*/ |
1886
|
2508 |
|
private function setMediawikiStructureOrData(array $export): string |
1887
|
|
|
{ |
1888
|
|
|
if ( |
1889
|
2508 |
|
! isset($export['mediawiki_structure_or_data']) |
1890
|
2508 |
|
|| ! in_array($export['mediawiki_structure_or_data'], ['structure', 'structure_and_data'], true) |
1891
|
|
|
) { |
1892
|
2500 |
|
return 'data'; |
1893
|
|
|
} |
1894
|
|
|
|
1895
|
8 |
|
return $export['mediawiki_structure_or_data']; |
1896
|
|
|
} |
1897
|
|
|
|
1898
|
|
|
/** @param array<int|string, mixed> $export */ |
1899
|
2508 |
|
private function setMediawikiCaption(array $export): bool |
1900
|
|
|
{ |
1901
|
2508 |
|
if (! isset($export['mediawiki_caption'])) { |
1902
|
2496 |
|
return true; |
1903
|
|
|
} |
1904
|
|
|
|
1905
|
12 |
|
return (bool) $export['mediawiki_caption']; |
1906
|
|
|
} |
1907
|
|
|
|
1908
|
|
|
/** @param array<int|string, mixed> $export */ |
1909
|
2508 |
|
private function setMediawikiHeaders(array $export): bool |
1910
|
|
|
{ |
1911
|
2508 |
|
if (! isset($export['mediawiki_headers'])) { |
1912
|
2496 |
|
return true; |
1913
|
|
|
} |
1914
|
|
|
|
1915
|
12 |
|
return (bool) $export['mediawiki_headers']; |
1916
|
|
|
} |
1917
|
|
|
|
1918
|
|
|
/** |
1919
|
|
|
* @param array<int|string, mixed> $export |
1920
|
|
|
* |
1921
|
|
|
* @psalm-return StructureOrDataType |
1922
|
|
|
*/ |
1923
|
2508 |
|
private function setOdsStructureOrData(array $export): string |
1924
|
|
|
{ |
1925
|
|
|
if ( |
1926
|
2508 |
|
! isset($export['ods_structure_or_data']) |
1927
|
2508 |
|
|| ! in_array($export['ods_structure_or_data'], ['structure', 'structure_and_data'], true) |
1928
|
|
|
) { |
1929
|
2500 |
|
return 'data'; |
1930
|
|
|
} |
1931
|
|
|
|
1932
|
8 |
|
return $export['ods_structure_or_data']; |
1933
|
|
|
} |
1934
|
|
|
|
1935
|
|
|
/** |
1936
|
|
|
* @param array<int|string, mixed> $export |
1937
|
|
|
* |
1938
|
|
|
* @psalm-return StructureOrDataType |
1939
|
|
|
*/ |
1940
|
2508 |
|
private function setPdfStructureOrData(array $export): string |
1941
|
|
|
{ |
1942
|
|
|
if ( |
1943
|
2508 |
|
! isset($export['pdf_structure_or_data']) |
1944
|
2508 |
|
|| ! in_array($export['pdf_structure_or_data'], ['structure', 'structure_and_data'], true) |
1945
|
|
|
) { |
1946
|
2500 |
|
return 'data'; |
1947
|
|
|
} |
1948
|
|
|
|
1949
|
8 |
|
return $export['pdf_structure_or_data']; |
1950
|
|
|
} |
1951
|
|
|
|
1952
|
|
|
/** |
1953
|
|
|
* @param array<int|string, mixed> $export |
1954
|
|
|
* |
1955
|
|
|
* @psalm-return StructureOrDataType |
1956
|
|
|
*/ |
1957
|
2508 |
|
private function setPhparrayStructureOrData(array $export): string |
1958
|
|
|
{ |
1959
|
|
|
if ( |
1960
|
2508 |
|
! isset($export['phparray_structure_or_data']) |
1961
|
2508 |
|
|| ! in_array($export['phparray_structure_or_data'], ['structure', 'structure_and_data'], true) |
1962
|
|
|
) { |
1963
|
2500 |
|
return 'data'; |
1964
|
|
|
} |
1965
|
|
|
|
1966
|
8 |
|
return $export['phparray_structure_or_data']; |
1967
|
|
|
} |
1968
|
|
|
|
1969
|
|
|
/** |
1970
|
|
|
* @param array<int|string, mixed> $export |
1971
|
|
|
* |
1972
|
|
|
* @psalm-return StructureOrDataType |
1973
|
|
|
*/ |
1974
|
2508 |
|
private function setJsonStructureOrData(array $export): string |
1975
|
|
|
{ |
1976
|
|
|
if ( |
1977
|
2508 |
|
! isset($export['json_structure_or_data']) |
1978
|
2508 |
|
|| ! in_array($export['json_structure_or_data'], ['structure', 'structure_and_data'], true) |
1979
|
|
|
) { |
1980
|
2500 |
|
return 'data'; |
1981
|
|
|
} |
1982
|
|
|
|
1983
|
8 |
|
return $export['json_structure_or_data']; |
1984
|
|
|
} |
1985
|
|
|
|
1986
|
|
|
/** @param array<int|string, mixed> $export */ |
1987
|
2508 |
|
private function setJsonPrettyPrint(array $export): bool |
1988
|
|
|
{ |
1989
|
2508 |
|
if (! isset($export['json_pretty_print'])) { |
1990
|
2496 |
|
return false; |
1991
|
|
|
} |
1992
|
|
|
|
1993
|
12 |
|
return (bool) $export['json_pretty_print']; |
1994
|
|
|
} |
1995
|
|
|
|
1996
|
|
|
/** @param array<int|string, mixed> $export */ |
1997
|
2508 |
|
private function setJsonUnicode(array $export): bool |
1998
|
|
|
{ |
1999
|
2508 |
|
if (! isset($export['json_unicode'])) { |
2000
|
2496 |
|
return true; |
2001
|
|
|
} |
2002
|
|
|
|
2003
|
12 |
|
return (bool) $export['json_unicode']; |
2004
|
|
|
} |
2005
|
|
|
|
2006
|
|
|
/** |
2007
|
|
|
* @param array<int|string, mixed> $export |
2008
|
|
|
* |
2009
|
|
|
* @psalm-return StructureOrDataType |
2010
|
|
|
*/ |
2011
|
2508 |
|
private function setSqlStructureOrData(array $export): string |
2012
|
|
|
{ |
2013
|
|
|
if ( |
2014
|
2508 |
|
! isset($export['sql_structure_or_data']) |
2015
|
2508 |
|
|| ! in_array($export['sql_structure_or_data'], ['structure', 'data'], true) |
2016
|
|
|
) { |
2017
|
2500 |
|
return 'structure_and_data'; |
2018
|
|
|
} |
2019
|
|
|
|
2020
|
8 |
|
return $export['sql_structure_or_data']; |
2021
|
|
|
} |
2022
|
|
|
|
2023
|
|
|
/** |
2024
|
|
|
* @param array<int|string, mixed> $export |
2025
|
|
|
* |
2026
|
|
|
* @psalm-return 'NONE'|'ANSI'|'DB2'|'MAXDB'|'MYSQL323'|'MYSQL40'|'MSSQL'|'ORACLE'|'TRADITIONAL' |
2027
|
|
|
*/ |
2028
|
2508 |
|
private function setSqlCompatibility(array $export): string |
2029
|
|
|
{ |
2030
|
|
|
if ( |
2031
|
2508 |
|
! isset($export['sql_compatibility']) || ! in_array($export['sql_compatibility'], [ |
2032
|
2508 |
|
'ANSI', |
2033
|
2508 |
|
'DB2', |
2034
|
2508 |
|
'MAXDB', |
2035
|
2508 |
|
'MYSQL323', |
2036
|
2508 |
|
'MYSQL40', |
2037
|
2508 |
|
'MSSQL', |
2038
|
2508 |
|
'ORACLE', |
2039
|
2508 |
|
'TRADITIONAL', |
2040
|
2508 |
|
], true) |
2041
|
|
|
) { |
2042
|
2476 |
|
return 'NONE'; |
2043
|
|
|
} |
2044
|
|
|
|
2045
|
32 |
|
return $export['sql_compatibility']; |
2046
|
|
|
} |
2047
|
|
|
|
2048
|
|
|
/** @param array<int|string, mixed> $export */ |
2049
|
2508 |
|
private function setSqlIncludeComments(array $export): bool |
2050
|
|
|
{ |
2051
|
2508 |
|
if (! isset($export['sql_include_comments'])) { |
2052
|
2496 |
|
return true; |
2053
|
|
|
} |
2054
|
|
|
|
2055
|
12 |
|
return (bool) $export['sql_include_comments']; |
2056
|
|
|
} |
2057
|
|
|
|
2058
|
|
|
/** @param array<int|string, mixed> $export */ |
2059
|
2508 |
|
private function setSqlDisableFk(array $export): bool |
2060
|
|
|
{ |
2061
|
2508 |
|
if (! isset($export['sql_disable_fk'])) { |
2062
|
2496 |
|
return false; |
2063
|
|
|
} |
2064
|
|
|
|
2065
|
12 |
|
return (bool) $export['sql_disable_fk']; |
2066
|
|
|
} |
2067
|
|
|
|
2068
|
|
|
/** @param array<int|string, mixed> $export */ |
2069
|
2508 |
|
private function setSqlViewsAsTables(array $export): bool |
2070
|
|
|
{ |
2071
|
2508 |
|
if (! isset($export['sql_views_as_tables'])) { |
2072
|
2496 |
|
return false; |
2073
|
|
|
} |
2074
|
|
|
|
2075
|
12 |
|
return (bool) $export['sql_views_as_tables']; |
2076
|
|
|
} |
2077
|
|
|
|
2078
|
|
|
/** @param array<int|string, mixed> $export */ |
2079
|
2508 |
|
private function setSqlMetadata(array $export): bool |
2080
|
|
|
{ |
2081
|
2508 |
|
if (! isset($export['sql_metadata'])) { |
2082
|
2496 |
|
return false; |
2083
|
|
|
} |
2084
|
|
|
|
2085
|
12 |
|
return (bool) $export['sql_metadata']; |
2086
|
|
|
} |
2087
|
|
|
|
2088
|
|
|
/** @param array<int|string, mixed> $export */ |
2089
|
2508 |
|
private function setSqlUseTransaction(array $export): bool |
2090
|
|
|
{ |
2091
|
2508 |
|
if (! isset($export['sql_use_transaction'])) { |
2092
|
2496 |
|
return true; |
2093
|
|
|
} |
2094
|
|
|
|
2095
|
12 |
|
return (bool) $export['sql_use_transaction']; |
2096
|
|
|
} |
2097
|
|
|
|
2098
|
|
|
/** @param array<int|string, mixed> $export */ |
2099
|
2508 |
|
private function setSqlCreateDatabase(array $export): bool |
2100
|
|
|
{ |
2101
|
2508 |
|
if (! isset($export['sql_create_database'])) { |
2102
|
2496 |
|
return false; |
2103
|
|
|
} |
2104
|
|
|
|
2105
|
12 |
|
return (bool) $export['sql_create_database']; |
2106
|
|
|
} |
2107
|
|
|
|
2108
|
|
|
/** @param array<int|string, mixed> $export */ |
2109
|
2508 |
|
private function setSqlDropDatabase(array $export): bool |
2110
|
|
|
{ |
2111
|
2508 |
|
if (! isset($export['sql_drop_database'])) { |
2112
|
2496 |
|
return false; |
2113
|
|
|
} |
2114
|
|
|
|
2115
|
12 |
|
return (bool) $export['sql_drop_database']; |
2116
|
|
|
} |
2117
|
|
|
|
2118
|
|
|
/** @param array<int|string, mixed> $export */ |
2119
|
2508 |
|
private function setSqlDropTable(array $export): bool |
2120
|
|
|
{ |
2121
|
2508 |
|
if (! isset($export['sql_drop_table'])) { |
2122
|
2496 |
|
return false; |
2123
|
|
|
} |
2124
|
|
|
|
2125
|
12 |
|
return (bool) $export['sql_drop_table']; |
2126
|
|
|
} |
2127
|
|
|
|
2128
|
|
|
/** @param array<int|string, mixed> $export */ |
2129
|
2508 |
|
private function setSqlIfNotExists(array $export): bool |
2130
|
|
|
{ |
2131
|
2508 |
|
if (! isset($export['sql_if_not_exists'])) { |
2132
|
2496 |
|
return false; |
2133
|
|
|
} |
2134
|
|
|
|
2135
|
12 |
|
return (bool) $export['sql_if_not_exists']; |
2136
|
|
|
} |
2137
|
|
|
|
2138
|
|
|
/** @param array<int|string, mixed> $export */ |
2139
|
2508 |
|
private function setSqlViewCurrentUser(array $export): bool |
2140
|
|
|
{ |
2141
|
2508 |
|
if (! isset($export['sql_view_current_user'])) { |
2142
|
2496 |
|
return false; |
2143
|
|
|
} |
2144
|
|
|
|
2145
|
12 |
|
return (bool) $export['sql_view_current_user']; |
2146
|
|
|
} |
2147
|
|
|
|
2148
|
|
|
/** @param array<int|string, mixed> $export */ |
2149
|
2508 |
|
private function setSqlOrReplaceView(array $export): bool |
2150
|
|
|
{ |
2151
|
2508 |
|
if (! isset($export['sql_or_replace_view'])) { |
2152
|
2496 |
|
return false; |
2153
|
|
|
} |
2154
|
|
|
|
2155
|
12 |
|
return (bool) $export['sql_or_replace_view']; |
2156
|
|
|
} |
2157
|
|
|
|
2158
|
|
|
/** @param array<int|string, mixed> $export */ |
2159
|
2508 |
|
private function setSqlProcedureFunction(array $export): bool |
2160
|
|
|
{ |
2161
|
2508 |
|
if (! isset($export['sql_procedure_function'])) { |
2162
|
2496 |
|
return true; |
2163
|
|
|
} |
2164
|
|
|
|
2165
|
12 |
|
return (bool) $export['sql_procedure_function']; |
2166
|
|
|
} |
2167
|
|
|
|
2168
|
|
|
/** @param array<int|string, mixed> $export */ |
2169
|
2508 |
|
private function setSqlCreateTable(array $export): bool |
2170
|
|
|
{ |
2171
|
2508 |
|
if (! isset($export['sql_create_table'])) { |
2172
|
2496 |
|
return true; |
2173
|
|
|
} |
2174
|
|
|
|
2175
|
12 |
|
return (bool) $export['sql_create_table']; |
2176
|
|
|
} |
2177
|
|
|
|
2178
|
|
|
/** @param array<int|string, mixed> $export */ |
2179
|
2508 |
|
private function setSqlCreateView(array $export): bool |
2180
|
|
|
{ |
2181
|
2508 |
|
if (! isset($export['sql_create_view'])) { |
2182
|
2496 |
|
return true; |
2183
|
|
|
} |
2184
|
|
|
|
2185
|
12 |
|
return (bool) $export['sql_create_view']; |
2186
|
|
|
} |
2187
|
|
|
|
2188
|
|
|
/** @param array<int|string, mixed> $export */ |
2189
|
2508 |
|
private function setSqlCreateTrigger(array $export): bool |
2190
|
|
|
{ |
2191
|
2508 |
|
if (! isset($export['sql_create_trigger'])) { |
2192
|
2496 |
|
return true; |
2193
|
|
|
} |
2194
|
|
|
|
2195
|
12 |
|
return (bool) $export['sql_create_trigger']; |
2196
|
|
|
} |
2197
|
|
|
|
2198
|
|
|
/** @param array<int|string, mixed> $export */ |
2199
|
2508 |
|
private function setSqlAutoIncrement(array $export): bool |
2200
|
|
|
{ |
2201
|
2508 |
|
if (! isset($export['sql_auto_increment'])) { |
2202
|
2496 |
|
return true; |
2203
|
|
|
} |
2204
|
|
|
|
2205
|
12 |
|
return (bool) $export['sql_auto_increment']; |
2206
|
|
|
} |
2207
|
|
|
|
2208
|
|
|
/** @param array<int|string, mixed> $export */ |
2209
|
2508 |
|
private function setSqlBackquotes(array $export): bool |
2210
|
|
|
{ |
2211
|
2508 |
|
if (! isset($export['sql_backquotes'])) { |
2212
|
2496 |
|
return true; |
2213
|
|
|
} |
2214
|
|
|
|
2215
|
12 |
|
return (bool) $export['sql_backquotes']; |
2216
|
|
|
} |
2217
|
|
|
|
2218
|
|
|
/** @param array<int|string, mixed> $export */ |
2219
|
2508 |
|
private function setSqlDates(array $export): bool |
2220
|
|
|
{ |
2221
|
2508 |
|
if (! isset($export['sql_dates'])) { |
2222
|
2496 |
|
return false; |
2223
|
|
|
} |
2224
|
|
|
|
2225
|
12 |
|
return (bool) $export['sql_dates']; |
2226
|
|
|
} |
2227
|
|
|
|
2228
|
|
|
/** @param array<int|string, mixed> $export */ |
2229
|
2508 |
|
private function setSqlRelation(array $export): bool |
2230
|
|
|
{ |
2231
|
2508 |
|
if (! isset($export['sql_relation'])) { |
2232
|
2496 |
|
return false; |
2233
|
|
|
} |
2234
|
|
|
|
2235
|
12 |
|
return (bool) $export['sql_relation']; |
2236
|
|
|
} |
2237
|
|
|
|
2238
|
|
|
/** @param array<int|string, mixed> $export */ |
2239
|
2508 |
|
private function setSqlTruncate(array $export): bool |
2240
|
|
|
{ |
2241
|
2508 |
|
if (! isset($export['sql_truncate'])) { |
2242
|
2496 |
|
return false; |
2243
|
|
|
} |
2244
|
|
|
|
2245
|
12 |
|
return (bool) $export['sql_truncate']; |
2246
|
|
|
} |
2247
|
|
|
|
2248
|
|
|
/** @param array<int|string, mixed> $export */ |
2249
|
2508 |
|
private function setSqlDelayed(array $export): bool |
2250
|
|
|
{ |
2251
|
2508 |
|
if (! isset($export['sql_delayed'])) { |
2252
|
2496 |
|
return false; |
2253
|
|
|
} |
2254
|
|
|
|
2255
|
12 |
|
return (bool) $export['sql_delayed']; |
2256
|
|
|
} |
2257
|
|
|
|
2258
|
|
|
/** @param array<int|string, mixed> $export */ |
2259
|
2508 |
|
private function setSqlIgnore(array $export): bool |
2260
|
|
|
{ |
2261
|
2508 |
|
if (! isset($export['sql_ignore'])) { |
2262
|
2496 |
|
return false; |
2263
|
|
|
} |
2264
|
|
|
|
2265
|
12 |
|
return (bool) $export['sql_ignore']; |
2266
|
|
|
} |
2267
|
|
|
|
2268
|
|
|
/** @param array<int|string, mixed> $export */ |
2269
|
2508 |
|
private function setSqlUtcTime(array $export): bool |
2270
|
|
|
{ |
2271
|
2508 |
|
if (! isset($export['sql_utc_time'])) { |
2272
|
2496 |
|
return true; |
2273
|
|
|
} |
2274
|
|
|
|
2275
|
12 |
|
return (bool) $export['sql_utc_time']; |
2276
|
|
|
} |
2277
|
|
|
|
2278
|
|
|
/** @param array<int|string, mixed> $export */ |
2279
|
2508 |
|
private function setSqlHexForBinary(array $export): bool |
2280
|
|
|
{ |
2281
|
2508 |
|
if (! isset($export['sql_hex_for_binary'])) { |
2282
|
2496 |
|
return true; |
2283
|
|
|
} |
2284
|
|
|
|
2285
|
12 |
|
return (bool) $export['sql_hex_for_binary']; |
2286
|
|
|
} |
2287
|
|
|
|
2288
|
|
|
/** |
2289
|
|
|
* @param array<int|string, mixed> $export |
2290
|
|
|
* |
2291
|
|
|
* @psalm-return 'INSERT'|'UPDATE'|'REPLACE' |
2292
|
|
|
*/ |
2293
|
2508 |
|
private function setSqlType(array $export): string |
2294
|
|
|
{ |
2295
|
2508 |
|
if (! isset($export['sql_type']) || ! in_array($export['sql_type'], ['UPDATE', 'REPLACE'], true)) { |
2296
|
2500 |
|
return 'INSERT'; |
2297
|
|
|
} |
2298
|
|
|
|
2299
|
8 |
|
return $export['sql_type']; |
2300
|
|
|
} |
2301
|
|
|
|
2302
|
|
|
/** |
2303
|
|
|
* @param array<int|string, mixed> $export |
2304
|
|
|
* |
2305
|
|
|
* @psalm-return 0|positive-int |
2306
|
|
|
*/ |
2307
|
2508 |
|
private function setSqlMaxQuerySize(array $export): int |
2308
|
|
|
{ |
2309
|
2508 |
|
if (! isset($export['sql_max_query_size'])) { |
2310
|
2496 |
|
return 50000; |
2311
|
|
|
} |
2312
|
|
|
|
2313
|
12 |
|
$maxQuerySize = (int) $export['sql_max_query_size']; |
2314
|
|
|
|
2315
|
12 |
|
return $maxQuerySize >= 0 ? $maxQuerySize : 50000; |
2316
|
|
|
} |
2317
|
|
|
|
2318
|
|
|
/** @param array<int|string, mixed> $export */ |
2319
|
2508 |
|
private function setSqlMime(array $export): bool |
2320
|
|
|
{ |
2321
|
2508 |
|
if (! isset($export['sql_mime'])) { |
2322
|
2496 |
|
return false; |
2323
|
|
|
} |
2324
|
|
|
|
2325
|
12 |
|
return (bool) $export['sql_mime']; |
2326
|
|
|
} |
2327
|
|
|
|
2328
|
|
|
/** @param array<int|string, mixed> $export */ |
2329
|
2508 |
|
private function setSqlHeaderComment(array $export): string |
2330
|
|
|
{ |
2331
|
2508 |
|
if (! isset($export['sql_header_comment'])) { |
2332
|
2496 |
|
return ''; |
2333
|
|
|
} |
2334
|
|
|
|
2335
|
12 |
|
return (string) $export['sql_header_comment']; |
2336
|
|
|
} |
2337
|
|
|
|
2338
|
|
|
/** |
2339
|
|
|
* @param array<int|string, mixed> $export |
2340
|
|
|
* |
2341
|
|
|
* @psalm-return 'complete'|'extended'|'both'|'none' |
2342
|
|
|
*/ |
2343
|
2508 |
|
private function setSqlInsertSyntax(array $export): string |
2344
|
|
|
{ |
2345
|
|
|
if ( |
2346
|
2508 |
|
! isset($export['sql_insert_syntax']) |
2347
|
2508 |
|
|| ! in_array($export['sql_insert_syntax'], ['complete', 'extended', 'none'], true) |
2348
|
|
|
) { |
2349
|
2496 |
|
return 'both'; |
2350
|
|
|
} |
2351
|
|
|
|
2352
|
12 |
|
return $export['sql_insert_syntax']; |
2353
|
|
|
} |
2354
|
|
|
|
2355
|
|
|
/** @param array<int|string, mixed> $export */ |
2356
|
2508 |
|
private function setPdfReportTitle(array $export): string |
2357
|
|
|
{ |
2358
|
2508 |
|
if (! isset($export['pdf_report_title'])) { |
2359
|
2496 |
|
return ''; |
2360
|
|
|
} |
2361
|
|
|
|
2362
|
12 |
|
return (string) $export['pdf_report_title']; |
2363
|
|
|
} |
2364
|
|
|
|
2365
|
|
|
/** |
2366
|
|
|
* @param array<int|string, mixed> $export |
2367
|
|
|
* |
2368
|
|
|
* @psalm-return StructureOrDataType |
2369
|
|
|
*/ |
2370
|
2508 |
|
private function setXmlStructureOrData(array $export): string |
2371
|
|
|
{ |
2372
|
|
|
if ( |
2373
|
2508 |
|
! isset($export['xml_structure_or_data']) |
2374
|
2508 |
|
|| ! in_array($export['xml_structure_or_data'], ['structure', 'structure_and_data'], true) |
2375
|
|
|
) { |
2376
|
2500 |
|
return 'data'; |
2377
|
|
|
} |
2378
|
|
|
|
2379
|
8 |
|
return $export['xml_structure_or_data']; |
2380
|
|
|
} |
2381
|
|
|
|
2382
|
|
|
/** @param array<int|string, mixed> $export */ |
2383
|
2508 |
|
private function setXmlExportStruc(array $export): bool |
2384
|
|
|
{ |
2385
|
2508 |
|
if (! isset($export['xml_export_struc'])) { |
2386
|
2496 |
|
return true; |
2387
|
|
|
} |
2388
|
|
|
|
2389
|
12 |
|
return (bool) $export['xml_export_struc']; |
2390
|
|
|
} |
2391
|
|
|
|
2392
|
|
|
/** @param array<int|string, mixed> $export */ |
2393
|
2508 |
|
private function setXmlExportEvents(array $export): bool |
2394
|
|
|
{ |
2395
|
2508 |
|
if (! isset($export['xml_export_events'])) { |
2396
|
2496 |
|
return true; |
2397
|
|
|
} |
2398
|
|
|
|
2399
|
12 |
|
return (bool) $export['xml_export_events']; |
2400
|
|
|
} |
2401
|
|
|
|
2402
|
|
|
/** @param array<int|string, mixed> $export */ |
2403
|
2508 |
|
private function setXmlExportFunctions(array $export): bool |
2404
|
|
|
{ |
2405
|
2508 |
|
if (! isset($export['xml_export_functions'])) { |
2406
|
2496 |
|
return true; |
2407
|
|
|
} |
2408
|
|
|
|
2409
|
12 |
|
return (bool) $export['xml_export_functions']; |
2410
|
|
|
} |
2411
|
|
|
|
2412
|
|
|
/** @param array<int|string, mixed> $export */ |
2413
|
2508 |
|
private function setXmlExportProcedures(array $export): bool |
2414
|
|
|
{ |
2415
|
2508 |
|
if (! isset($export['xml_export_procedures'])) { |
2416
|
2496 |
|
return true; |
2417
|
|
|
} |
2418
|
|
|
|
2419
|
12 |
|
return (bool) $export['xml_export_procedures']; |
2420
|
|
|
} |
2421
|
|
|
|
2422
|
|
|
/** @param array<int|string, mixed> $export */ |
2423
|
2508 |
|
private function setXmlExportTables(array $export): bool |
2424
|
|
|
{ |
2425
|
2508 |
|
if (! isset($export['xml_export_tables'])) { |
2426
|
2496 |
|
return true; |
2427
|
|
|
} |
2428
|
|
|
|
2429
|
12 |
|
return (bool) $export['xml_export_tables']; |
2430
|
|
|
} |
2431
|
|
|
|
2432
|
|
|
/** @param array<int|string, mixed> $export */ |
2433
|
2508 |
|
private function setXmlExportTriggers(array $export): bool |
2434
|
|
|
{ |
2435
|
2508 |
|
if (! isset($export['xml_export_triggers'])) { |
2436
|
2496 |
|
return true; |
2437
|
|
|
} |
2438
|
|
|
|
2439
|
12 |
|
return (bool) $export['xml_export_triggers']; |
2440
|
|
|
} |
2441
|
|
|
|
2442
|
|
|
/** @param array<int|string, mixed> $export */ |
2443
|
2508 |
|
private function setXmlExportViews(array $export): bool |
2444
|
|
|
{ |
2445
|
2508 |
|
if (! isset($export['xml_export_views'])) { |
2446
|
2496 |
|
return true; |
2447
|
|
|
} |
2448
|
|
|
|
2449
|
12 |
|
return (bool) $export['xml_export_views']; |
2450
|
|
|
} |
2451
|
|
|
|
2452
|
|
|
/** @param array<int|string, mixed> $export */ |
2453
|
2508 |
|
private function setXmlExportContents(array $export): bool |
2454
|
|
|
{ |
2455
|
2508 |
|
if (! isset($export['xml_export_contents'])) { |
2456
|
2496 |
|
return true; |
2457
|
|
|
} |
2458
|
|
|
|
2459
|
12 |
|
return (bool) $export['xml_export_contents']; |
2460
|
|
|
} |
2461
|
|
|
|
2462
|
|
|
/** |
2463
|
|
|
* @param array<int|string, mixed> $export |
2464
|
|
|
* |
2465
|
|
|
* @psalm-return StructureOrDataType |
2466
|
|
|
*/ |
2467
|
2508 |
|
private function setYamlStructureOrData(array $export): string |
2468
|
|
|
{ |
2469
|
|
|
if ( |
2470
|
2508 |
|
! isset($export['yaml_structure_or_data']) |
2471
|
2508 |
|
|| ! in_array($export['yaml_structure_or_data'], ['structure', 'structure_and_data'], true) |
2472
|
|
|
) { |
2473
|
2500 |
|
return 'data'; |
2474
|
|
|
} |
2475
|
|
|
|
2476
|
8 |
|
return $export['yaml_structure_or_data']; |
2477
|
|
|
} |
2478
|
|
|
|
2479
|
|
|
/** @param array<int|string, mixed> $export */ |
2480
|
2508 |
|
private function setRemoveDefinerClause(array $export): bool |
2481
|
|
|
{ |
2482
|
2508 |
|
if (! isset($export['remove_definer_from_definitions'])) { |
2483
|
2496 |
|
return false; |
2484
|
|
|
} |
2485
|
|
|
|
2486
|
12 |
|
return (bool) $export['remove_definer_from_definitions']; |
2487
|
|
|
} |
2488
|
|
|
} |
2489
|
|
|
|