Deployed a39d61c to 5.4 with MkDocs 1.1.2 and mike 1.0.0
[GitHub/WoltLab/woltlab.github.io.git] / 5.4 / php / code-style-documentation / index.html
1
2 <!doctype html>
3 <html lang="en" class="no-js">
4 <head>
5
6 <meta charset="utf-8">
7 <meta name="viewport" content="width=device-width,initial-scale=1">
8
9
10
11
12 <link rel="canonical" href="https://docs.woltlab.com/5.4/php/code-style-documentation/">
13
14 <link rel="icon" href="../../assets/default.favicon.ico">
15 <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.1.2">
16
17
18
19 <title>Documentation - WoltLab Suite Documentation</title>
20
21
22
23 <link rel="stylesheet" href="../../assets/stylesheets/main.6f955dcd.min.css">
24
25
26 <link rel="stylesheet" href="../../assets/stylesheets/palette.ef6f36e2.min.css">
27
28
29
30 <meta name="theme-color" content="#009485">
31
32
33
34
35
36
37
38
39
40 <link rel="stylesheet" href="../../stylesheets/extra.css">
41
42
43
44
45
46 </head>
47
48
49
50
51
52
53
54 <body dir="ltr" data-md-color-scheme="" data-md-color-primary="teal" data-md-color-accent="">
55
56
57 <script>function __prefix(e){return new URL("../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
58
59 <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
60 <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
61 <label class="md-overlay" for="__drawer"></label>
62 <div data-md-component="skip">
63
64
65 <a href="#documentation" class="md-skip">
66 Skip to content
67 </a>
68
69 </div>
70 <div data-md-component="announce">
71
72 <aside class="md-announce">
73 <div class="md-announce__inner md-grid md-typeset">
74
75 <a href="https://www.woltlab.com">Back to <strong>woltlab.com</strong></a>
76
77 </div>
78 </aside>
79
80 </div>
81
82 <header class="md-header" data-md-component="header">
83 <nav class="md-header__inner md-grid" aria-label="Header">
84 <a href="../.." title="WoltLab Suite Documentation" class="md-header__button md-logo" aria-label="WoltLab Suite Documentation" data-md-component="logo">
85
86 <img src="../../assets/logo.png" alt="logo">
87
88 </a>
89 <label class="md-header__button md-icon" for="__drawer">
90 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
91 </label>
92 <div class="md-header__title" data-md-component="header-title">
93 <div class="md-header__ellipsis">
94 <div class="md-header__topic">
95 <span class="md-ellipsis">
96 WoltLab Suite Documentation
97 </span>
98 </div>
99 <div class="md-header__topic" data-md-component="header-topic">
100 <span class="md-ellipsis">
101
102 Documentation
103
104 </span>
105 </div>
106 </div>
107 </div>
108
109
110
111 <label class="md-header__button md-icon" for="__search">
112 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
113 </label>
114
115 <div class="md-search" data-md-component="search" role="dialog">
116 <label class="md-search__overlay" for="__search"></label>
117 <div class="md-search__inner" role="search">
118 <form class="md-search__form" name="search">
119 <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
120 <label class="md-search__icon md-icon" for="__search">
121 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
122 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
123 </label>
124 <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
125 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
126 </button>
127 </form>
128 <div class="md-search__output">
129 <div class="md-search__scrollwrap" data-md-scrollfix>
130 <div class="md-search-result" data-md-component="search-result">
131 <div class="md-search-result__meta">
132 Initializing search
133 </div>
134 <ol class="md-search-result__list"></ol>
135 </div>
136 </div>
137 </div>
138 </div>
139 </div>
140
141
142 <div class="md-header__source">
143
144 <a href="https://github.com/WoltLab/docs.woltlab.com/" title="Go to repository" class="md-source" data-md-component="source">
145 <div class="md-source__icon md-icon">
146
147 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
148 </div>
149 <div class="md-source__repository">
150 GitHub
151 </div>
152 </a>
153 </div>
154
155 </nav>
156 </header>
157
158 <div class="md-container" data-md-component="container">
159
160
161
162
163 <main class="md-main" data-md-component="main">
164 <div class="md-main__inner md-grid">
165
166
167
168 <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
169 <div class="md-sidebar__scrollwrap">
170 <div class="md-sidebar__inner">
171
172
173
174 <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
175 <label class="md-nav__title" for="__drawer">
176 <a href="../.." title="WoltLab Suite Documentation" class="md-nav__button md-logo" aria-label="WoltLab Suite Documentation" data-md-component="logo">
177
178 <img src="../../assets/logo.png" alt="logo">
179
180 </a>
181 WoltLab Suite Documentation
182 </label>
183
184 <div class="md-nav__source">
185
186 <a href="https://github.com/WoltLab/docs.woltlab.com/" title="Go to repository" class="md-source" data-md-component="source">
187 <div class="md-source__icon md-icon">
188
189 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
190 </div>
191 <div class="md-source__repository">
192 GitHub
193 </div>
194 </a>
195 </div>
196
197 <ul class="md-nav__list" data-md-scrollfix>
198
199
200
201
202
203
204
205
206 <li class="md-nav__item">
207 <a href="../../getting-started/" class="md-nav__link">
208 Getting Started
209 </a>
210 </li>
211
212
213
214
215
216
217
218
219
220
221
222 <li class="md-nav__item md-nav__item--nested">
223
224
225 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2" type="checkbox" id="__nav_2" >
226
227 <label class="md-nav__link" for="__nav_2">
228 PHP API
229 <span class="md-nav__icon md-icon"></span>
230 </label>
231 <nav class="md-nav" aria-label="PHP API" data-md-level="1">
232 <label class="md-nav__title" for="__nav_2">
233 <span class="md-nav__icon md-icon"></span>
234 PHP API
235 </label>
236 <ul class="md-nav__list" data-md-scrollfix>
237
238
239
240
241
242 <li class="md-nav__item">
243 <a href="../pages/" class="md-nav__link">
244 Pages
245 </a>
246 </li>
247
248
249
250
251
252
253
254 <li class="md-nav__item">
255 <a href="../database-objects/" class="md-nav__link">
256 Database Objects
257 </a>
258 </li>
259
260
261
262
263
264
265
266 <li class="md-nav__item">
267 <a href="../database-access/" class="md-nav__link">
268 Database Access
269 </a>
270 </li>
271
272
273
274
275
276
277
278 <li class="md-nav__item">
279 <a href="../exceptions/" class="md-nav__link">
280 Exceptions
281 </a>
282 </li>
283
284
285
286
287
288
289
290
291 <li class="md-nav__item md-nav__item--nested">
292
293
294 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2_5" type="checkbox" id="__nav_2_5" >
295
296 <label class="md-nav__link" for="__nav_2_5">
297 API
298 <span class="md-nav__icon md-icon"></span>
299 </label>
300 <nav class="md-nav" aria-label="API" data-md-level="2">
301 <label class="md-nav__title" for="__nav_2_5">
302 <span class="md-nav__icon md-icon"></span>
303 API
304 </label>
305 <ul class="md-nav__list" data-md-scrollfix>
306
307
308
309
310
311
312 <li class="md-nav__item md-nav__item--nested">
313
314
315 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2_5_1" type="checkbox" id="__nav_2_5_1" >
316
317 <label class="md-nav__link" for="__nav_2_5_1">
318 Caches
319 <span class="md-nav__icon md-icon"></span>
320 </label>
321 <nav class="md-nav" aria-label="Caches" data-md-level="3">
322 <label class="md-nav__title" for="__nav_2_5_1">
323 <span class="md-nav__icon md-icon"></span>
324 Caches
325 </label>
326 <ul class="md-nav__list" data-md-scrollfix>
327
328
329
330
331
332 <li class="md-nav__item">
333 <a href="../api/caches/" class="md-nav__link">
334 Overview
335 </a>
336 </li>
337
338
339
340
341
342
343
344 <li class="md-nav__item">
345 <a href="../api/caches_persistent-caches/" class="md-nav__link">
346 Persistent Caches
347 </a>
348 </li>
349
350
351
352
353
354
355
356 <li class="md-nav__item">
357 <a href="../api/caches_runtime-caches/" class="md-nav__link">
358 Runtime Caches
359 </a>
360 </li>
361
362
363
364 </ul>
365 </nav>
366 </li>
367
368
369
370
371
372
373
374 <li class="md-nav__item">
375 <a href="../api/comments/" class="md-nav__link">
376 Comments
377 </a>
378 </li>
379
380
381
382
383
384
385
386 <li class="md-nav__item">
387 <a href="../api/cronjobs/" class="md-nav__link">
388 Cronjobs
389 </a>
390 </li>
391
392
393
394
395
396
397
398 <li class="md-nav__item">
399 <a href="../api/events/" class="md-nav__link">
400 Events
401 </a>
402 </li>
403
404
405
406
407
408
409
410
411 <li class="md-nav__item md-nav__item--nested">
412
413
414 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2_5_5" type="checkbox" id="__nav_2_5_5" >
415
416 <label class="md-nav__link" for="__nav_2_5_5">
417 Form Builder
418 <span class="md-nav__icon md-icon"></span>
419 </label>
420 <nav class="md-nav" aria-label="Form Builder" data-md-level="3">
421 <label class="md-nav__title" for="__nav_2_5_5">
422 <span class="md-nav__icon md-icon"></span>
423 Form Builder
424 </label>
425 <ul class="md-nav__list" data-md-scrollfix>
426
427
428
429
430
431 <li class="md-nav__item">
432 <a href="../api/form_builder/overview/" class="md-nav__link">
433 Overview
434 </a>
435 </li>
436
437
438
439
440
441
442
443 <li class="md-nav__item">
444 <a href="../api/form_builder/structure/" class="md-nav__link">
445 Structure
446 </a>
447 </li>
448
449
450
451
452
453
454
455 <li class="md-nav__item">
456 <a href="../api/form_builder/form_fields/" class="md-nav__link">
457 Fields
458 </a>
459 </li>
460
461
462
463
464
465
466
467 <li class="md-nav__item">
468 <a href="../api/form_builder/validation_data/" class="md-nav__link">
469 Validation and Data
470 </a>
471 </li>
472
473
474
475
476
477
478
479 <li class="md-nav__item">
480 <a href="../api/form_builder/dependencies/" class="md-nav__link">
481 Dependencies
482 </a>
483 </li>
484
485
486
487 </ul>
488 </nav>
489 </li>
490
491
492
493
494
495
496
497 <li class="md-nav__item">
498 <a href="../api/package_installation_plugins/" class="md-nav__link">
499 Package Installation Plugins
500 </a>
501 </li>
502
503
504
505
506
507
508
509 <li class="md-nav__item">
510 <a href="../api/user_activity_points/" class="md-nav__link">
511 User Activity Points
512 </a>
513 </li>
514
515
516
517
518
519
520
521 <li class="md-nav__item">
522 <a href="../api/user_notifications/" class="md-nav__link">
523 User Notifications
524 </a>
525 </li>
526
527
528
529
530
531
532
533 <li class="md-nav__item">
534 <a href="../api/sitemaps/" class="md-nav__link">
535 Sitemaps
536 </a>
537 </li>
538
539
540
541 </ul>
542 </nav>
543 </li>
544
545
546
547
548
549
550
551 <li class="md-nav__item">
552 <a href="../code-style/" class="md-nav__link">
553 Code Style
554 </a>
555 </li>
556
557
558
559
560
561
562
563 <li class="md-nav__item">
564 <a href="../apps/" class="md-nav__link">
565 Apps
566 </a>
567 </li>
568
569
570
571
572
573
574
575 <li class="md-nav__item">
576 <a href="../gdpr/" class="md-nav__link">
577 GDPR
578 </a>
579 </li>
580
581
582
583 </ul>
584 </nav>
585 </li>
586
587
588
589
590
591
592
593
594
595
596
597 <li class="md-nav__item md-nav__item--nested">
598
599
600 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" >
601
602 <label class="md-nav__link" for="__nav_3">
603 Languages, Templates & CSS
604 <span class="md-nav__icon md-icon"></span>
605 </label>
606 <nav class="md-nav" aria-label="Languages, Templates & CSS" data-md-level="1">
607 <label class="md-nav__title" for="__nav_3">
608 <span class="md-nav__icon md-icon"></span>
609 Languages, Templates & CSS
610 </label>
611 <ul class="md-nav__list" data-md-scrollfix>
612
613
614
615
616
617 <li class="md-nav__item">
618 <a href="../../view/languages/" class="md-nav__link">
619 Languages
620 </a>
621 </li>
622
623
624
625
626
627
628
629 <li class="md-nav__item">
630 <a href="../../view/templates/" class="md-nav__link">
631 Templates
632 </a>
633 </li>
634
635
636
637
638
639
640
641 <li class="md-nav__item">
642 <a href="../../view/template-plugins/" class="md-nav__link">
643 Template Plugins
644 </a>
645 </li>
646
647
648
649
650
651
652
653 <li class="md-nav__item">
654 <a href="../../view/css/" class="md-nav__link">
655 CSS
656 </a>
657 </li>
658
659
660
661 </ul>
662 </nav>
663 </li>
664
665
666
667
668
669
670
671
672
673
674
675 <li class="md-nav__item md-nav__item--nested">
676
677
678 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" >
679
680 <label class="md-nav__link" for="__nav_4">
681 TypeScript and JavaScript API
682 <span class="md-nav__icon md-icon"></span>
683 </label>
684 <nav class="md-nav" aria-label="TypeScript and JavaScript API" data-md-level="1">
685 <label class="md-nav__title" for="__nav_4">
686 <span class="md-nav__icon md-icon"></span>
687 TypeScript and JavaScript API
688 </label>
689 <ul class="md-nav__list" data-md-scrollfix>
690
691
692
693
694
695 <li class="md-nav__item">
696 <a href="../../javascript/general-usage/" class="md-nav__link">
697 General Usage
698 </a>
699 </li>
700
701
702
703
704
705
706
707 <li class="md-nav__item">
708 <a href="../../javascript/typescript/" class="md-nav__link">
709 TypeScript
710 </a>
711 </li>
712
713
714
715
716
717
718
719
720 <li class="md-nav__item md-nav__item--nested">
721
722
723 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4_3" type="checkbox" id="__nav_4_3" >
724
725 <label class="md-nav__link" for="__nav_4_3">
726 New API
727 <span class="md-nav__icon md-icon"></span>
728 </label>
729 <nav class="md-nav" aria-label="New API" data-md-level="2">
730 <label class="md-nav__title" for="__nav_4_3">
731 <span class="md-nav__icon md-icon"></span>
732 New API
733 </label>
734 <ul class="md-nav__list" data-md-scrollfix>
735
736
737
738
739
740 <li class="md-nav__item">
741 <a href="../../javascript/new-api_writing-a-module/" class="md-nav__link">
742 Writing a module
743 </a>
744 </li>
745
746
747
748
749
750
751
752 <li class="md-nav__item">
753 <a href="../../javascript/new-api_data-structures/" class="md-nav__link">
754 Data Structures
755 </a>
756 </li>
757
758
759
760
761
762
763
764 <li class="md-nav__item">
765 <a href="../../javascript/new-api_core/" class="md-nav__link">
766 Core Functions
767 </a>
768 </li>
769
770
771
772
773
774
775
776 <li class="md-nav__item">
777 <a href="../../javascript/new-api_dom/" class="md-nav__link">
778 DOM
779 </a>
780 </li>
781
782
783
784
785
786
787
788 <li class="md-nav__item">
789 <a href="../../javascript/new-api_events/" class="md-nav__link">
790 Event Handling
791 </a>
792 </li>
793
794
795
796
797
798
799
800 <li class="md-nav__item">
801 <a href="../../javascript/new-api_ajax/" class="md-nav__link">
802 Ajax
803 </a>
804 </li>
805
806
807
808
809
810
811
812 <li class="md-nav__item">
813 <a href="../../javascript/new-api_dialogs/" class="md-nav__link">
814 Dialogs
815 </a>
816 </li>
817
818
819
820
821
822
823
824 <li class="md-nav__item">
825 <a href="../../javascript/new-api_browser/" class="md-nav__link">
826 Browser and Screen Sizes
827 </a>
828 </li>
829
830
831
832
833
834
835
836 <li class="md-nav__item">
837 <a href="../../javascript/new-api_ui/" class="md-nav__link">
838 User Interface
839 </a>
840 </li>
841
842
843
844 </ul>
845 </nav>
846 </li>
847
848
849
850
851
852
853
854 <li class="md-nav__item">
855 <a href="../../javascript/legacy-api/" class="md-nav__link">
856 Legacy API
857 </a>
858 </li>
859
860
861
862
863
864
865
866 <li class="md-nav__item">
867 <a href="../../javascript/helper-functions/" class="md-nav__link">
868 Helper Functions
869 </a>
870 </li>
871
872
873
874
875
876
877
878 <li class="md-nav__item">
879 <a href="../../javascript/code-snippets/" class="md-nav__link">
880 Code Snippets
881 </a>
882 </li>
883
884
885
886 </ul>
887 </nav>
888 </li>
889
890
891
892
893
894
895
896
897
898
899
900 <li class="md-nav__item md-nav__item--nested">
901
902
903 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" >
904
905 <label class="md-nav__link" for="__nav_5">
906 Package Components
907 <span class="md-nav__icon md-icon"></span>
908 </label>
909 <nav class="md-nav" aria-label="Package Components" data-md-level="1">
910 <label class="md-nav__title" for="__nav_5">
911 <span class="md-nav__icon md-icon"></span>
912 Package Components
913 </label>
914 <ul class="md-nav__list" data-md-scrollfix>
915
916
917
918
919
920 <li class="md-nav__item">
921 <a href="../../package/package-xml/" class="md-nav__link">
922 package.xml
923 </a>
924 </li>
925
926
927
928
929
930
931
932
933 <li class="md-nav__item md-nav__item--nested">
934
935
936 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5_2" type="checkbox" id="__nav_5_2" >
937
938 <label class="md-nav__link" for="__nav_5_2">
939 PIPs
940 <span class="md-nav__icon md-icon"></span>
941 </label>
942 <nav class="md-nav" aria-label="PIPs" data-md-level="2">
943 <label class="md-nav__title" for="__nav_5_2">
944 <span class="md-nav__icon md-icon"></span>
945 PIPs
946 </label>
947 <ul class="md-nav__list" data-md-scrollfix>
948
949
950
951
952
953 <li class="md-nav__item">
954 <a href="../../package/pip/" class="md-nav__link">
955 Overview
956 </a>
957 </li>
958
959
960
961
962
963
964
965 <li class="md-nav__item">
966 <a href="../../package/pip/acl-option/" class="md-nav__link">
967 aclOption
968 </a>
969 </li>
970
971
972
973
974
975
976
977 <li class="md-nav__item">
978 <a href="../../package/pip/acp-menu/" class="md-nav__link">
979 acpMenu
980 </a>
981 </li>
982
983
984
985
986
987
988
989 <li class="md-nav__item">
990 <a href="../../package/pip/acp-search-provider/" class="md-nav__link">
991 acpSearchProvider
992 </a>
993 </li>
994
995
996
997
998
999
1000
1001 <li class="md-nav__item">
1002 <a href="../../package/pip/acp-template/" class="md-nav__link">
1003 acpTemplate
1004 </a>
1005 </li>
1006
1007
1008
1009
1010
1011
1012
1013 <li class="md-nav__item">
1014 <a href="../../package/pip/bbcode/" class="md-nav__link">
1015 bbcode
1016 </a>
1017 </li>
1018
1019
1020
1021
1022
1023
1024
1025 <li class="md-nav__item">
1026 <a href="../../package/pip/box/" class="md-nav__link">
1027 box
1028 </a>
1029 </li>
1030
1031
1032
1033
1034
1035
1036
1037 <li class="md-nav__item">
1038 <a href="../../package/pip/clipboard-action/" class="md-nav__link">
1039 clipboardAction
1040 </a>
1041 </li>
1042
1043
1044
1045
1046
1047
1048
1049 <li class="md-nav__item">
1050 <a href="../../package/pip/core-object/" class="md-nav__link">
1051 coreObject
1052 </a>
1053 </li>
1054
1055
1056
1057
1058
1059
1060
1061 <li class="md-nav__item">
1062 <a href="../../package/pip/cronjob/" class="md-nav__link">
1063 cronjob
1064 </a>
1065 </li>
1066
1067
1068
1069
1070
1071
1072
1073 <li class="md-nav__item">
1074 <a href="../../package/pip/database/" class="md-nav__link">
1075 database
1076 </a>
1077 </li>
1078
1079
1080
1081
1082
1083
1084
1085 <li class="md-nav__item">
1086 <a href="../../package/pip/event-listener/" class="md-nav__link">
1087 eventListener
1088 </a>
1089 </li>
1090
1091
1092
1093
1094
1095
1096
1097 <li class="md-nav__item">
1098 <a href="../../package/pip/file/" class="md-nav__link">
1099 file
1100 </a>
1101 </li>
1102
1103
1104
1105
1106
1107
1108
1109 <li class="md-nav__item">
1110 <a href="../../package/pip/language/" class="md-nav__link">
1111 language
1112 </a>
1113 </li>
1114
1115
1116
1117
1118
1119
1120
1121 <li class="md-nav__item">
1122 <a href="../../package/pip/media-provider/" class="md-nav__link">
1123 mediaProvider
1124 </a>
1125 </li>
1126
1127
1128
1129
1130
1131
1132
1133 <li class="md-nav__item">
1134 <a href="../../package/pip/menu/" class="md-nav__link">
1135 menu
1136 </a>
1137 </li>
1138
1139
1140
1141
1142
1143
1144
1145 <li class="md-nav__item">
1146 <a href="../../package/pip/menu-item/" class="md-nav__link">
1147 menuItem
1148 </a>
1149 </li>
1150
1151
1152
1153
1154
1155
1156
1157 <li class="md-nav__item">
1158 <a href="../../package/pip/object-type/" class="md-nav__link">
1159 objectType
1160 </a>
1161 </li>
1162
1163
1164
1165
1166
1167
1168
1169 <li class="md-nav__item">
1170 <a href="../../package/pip/object-type-definition/" class="md-nav__link">
1171 objectTypeDefinition
1172 </a>
1173 </li>
1174
1175
1176
1177
1178
1179
1180
1181 <li class="md-nav__item">
1182 <a href="../../package/pip/option/" class="md-nav__link">
1183 option
1184 </a>
1185 </li>
1186
1187
1188
1189
1190
1191
1192
1193 <li class="md-nav__item">
1194 <a href="../../package/pip/page/" class="md-nav__link">
1195 page
1196 </a>
1197 </li>
1198
1199
1200
1201
1202
1203
1204
1205 <li class="md-nav__item">
1206 <a href="../../package/pip/pip/" class="md-nav__link">
1207 pip
1208 </a>
1209 </li>
1210
1211
1212
1213
1214
1215
1216
1217 <li class="md-nav__item">
1218 <a href="../../package/pip/script/" class="md-nav__link">
1219 script
1220 </a>
1221 </li>
1222
1223
1224
1225
1226
1227
1228
1229 <li class="md-nav__item">
1230 <a href="../../package/pip/smiley/" class="md-nav__link">
1231 smiley
1232 </a>
1233 </li>
1234
1235
1236
1237
1238
1239
1240
1241 <li class="md-nav__item">
1242 <a href="../../package/pip/sql/" class="md-nav__link">
1243 sql
1244 </a>
1245 </li>
1246
1247
1248
1249
1250
1251
1252
1253 <li class="md-nav__item">
1254 <a href="../../package/pip/style/" class="md-nav__link">
1255 style
1256 </a>
1257 </li>
1258
1259
1260
1261
1262
1263
1264
1265 <li class="md-nav__item">
1266 <a href="../../package/pip/template/" class="md-nav__link">
1267 template
1268 </a>
1269 </li>
1270
1271
1272
1273
1274
1275
1276
1277 <li class="md-nav__item">
1278 <a href="../../package/pip/template-listener/" class="md-nav__link">
1279 templateListener
1280 </a>
1281 </li>
1282
1283
1284
1285
1286
1287
1288
1289 <li class="md-nav__item">
1290 <a href="../../package/pip/user-group-option/" class="md-nav__link">
1291 userGroupOption
1292 </a>
1293 </li>
1294
1295
1296
1297
1298
1299
1300
1301 <li class="md-nav__item">
1302 <a href="../../package/pip/user-menu/" class="md-nav__link">
1303 userMenu
1304 </a>
1305 </li>
1306
1307
1308
1309
1310
1311
1312
1313 <li class="md-nav__item">
1314 <a href="../../package/pip/user-notification-event/" class="md-nav__link">
1315 userNotificationEvent
1316 </a>
1317 </li>
1318
1319
1320
1321
1322
1323
1324
1325 <li class="md-nav__item">
1326 <a href="../../package/pip/user-option/" class="md-nav__link">
1327 userOption
1328 </a>
1329 </li>
1330
1331
1332
1333
1334
1335
1336
1337 <li class="md-nav__item">
1338 <a href="../../package/pip/user-profile-menu/" class="md-nav__link">
1339 userProfileMenu
1340 </a>
1341 </li>
1342
1343
1344
1345 </ul>
1346 </nav>
1347 </li>
1348
1349
1350
1351
1352
1353
1354
1355 <li class="md-nav__item">
1356 <a href="../../package/database-php-api/" class="md-nav__link">
1357 Database PHP API
1358 </a>
1359 </li>
1360
1361
1362
1363 </ul>
1364 </nav>
1365 </li>
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377 <li class="md-nav__item md-nav__item--nested">
1378
1379
1380 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" >
1381
1382 <label class="md-nav__link" for="__nav_6">
1383 Migration
1384 <span class="md-nav__icon md-icon"></span>
1385 </label>
1386 <nav class="md-nav" aria-label="Migration" data-md-level="1">
1387 <label class="md-nav__title" for="__nav_6">
1388 <span class="md-nav__icon md-icon"></span>
1389 Migration
1390 </label>
1391 <ul class="md-nav__list" data-md-scrollfix>
1392
1393
1394
1395
1396
1397
1398 <li class="md-nav__item md-nav__item--nested">
1399
1400
1401 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6_1" type="checkbox" id="__nav_6_1" >
1402
1403 <label class="md-nav__link" for="__nav_6_1">
1404 Migrating from WSC 5.3
1405 <span class="md-nav__icon md-icon"></span>
1406 </label>
1407 <nav class="md-nav" aria-label="Migrating from WSC 5.3" data-md-level="2">
1408 <label class="md-nav__title" for="__nav_6_1">
1409 <span class="md-nav__icon md-icon"></span>
1410 Migrating from WSC 5.3
1411 </label>
1412 <ul class="md-nav__list" data-md-scrollfix>
1413
1414
1415
1416
1417
1418 <li class="md-nav__item">
1419 <a href="../../migration/wsc53/php/" class="md-nav__link">
1420 PHP API
1421 </a>
1422 </li>
1423
1424
1425
1426
1427
1428
1429
1430 <li class="md-nav__item">
1431 <a href="../../migration/wsc53/session/" class="md-nav__link">
1432 Session Handling and Authentication
1433 </a>
1434 </li>
1435
1436
1437
1438
1439
1440
1441
1442 <li class="md-nav__item">
1443 <a href="../../migration/wsc53/javascript/" class="md-nav__link">
1444 TypeScript and JavaScript
1445 </a>
1446 </li>
1447
1448
1449
1450
1451
1452
1453
1454 <li class="md-nav__item">
1455 <a href="../../migration/wsc53/templates/" class="md-nav__link">
1456 Templates
1457 </a>
1458 </li>
1459
1460
1461
1462
1463
1464
1465
1466 <li class="md-nav__item">
1467 <a href="../../migration/wsc53/libraries/" class="md-nav__link">
1468 Third Party Libraries
1469 </a>
1470 </li>
1471
1472
1473
1474 </ul>
1475 </nav>
1476 </li>
1477
1478
1479
1480
1481
1482
1483
1484
1485 <li class="md-nav__item md-nav__item--nested">
1486
1487
1488 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6_2" type="checkbox" id="__nav_6_2" >
1489
1490 <label class="md-nav__link" for="__nav_6_2">
1491 Migrating from WSC 5.2
1492 <span class="md-nav__icon md-icon"></span>
1493 </label>
1494 <nav class="md-nav" aria-label="Migrating from WSC 5.2" data-md-level="2">
1495 <label class="md-nav__title" for="__nav_6_2">
1496 <span class="md-nav__icon md-icon"></span>
1497 Migrating from WSC 5.2
1498 </label>
1499 <ul class="md-nav__list" data-md-scrollfix>
1500
1501
1502
1503
1504
1505 <li class="md-nav__item">
1506 <a href="../../migration/wsc52/php/" class="md-nav__link">
1507 PHP API
1508 </a>
1509 </li>
1510
1511
1512
1513
1514
1515
1516
1517 <li class="md-nav__item">
1518 <a href="../../migration/wsc52/templates/" class="md-nav__link">
1519 Templates and Languages
1520 </a>
1521 </li>
1522
1523
1524
1525
1526
1527
1528
1529 <li class="md-nav__item">
1530 <a href="../../migration/wsc52/libraries/" class="md-nav__link">
1531 Third Party Libraries
1532 </a>
1533 </li>
1534
1535
1536
1537 </ul>
1538 </nav>
1539 </li>
1540
1541
1542
1543
1544
1545
1546
1547
1548 <li class="md-nav__item md-nav__item--nested">
1549
1550
1551 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6_3" type="checkbox" id="__nav_6_3" >
1552
1553 <label class="md-nav__link" for="__nav_6_3">
1554 Migrating from WSC 3.1
1555 <span class="md-nav__icon md-icon"></span>
1556 </label>
1557 <nav class="md-nav" aria-label="Migrating from WSC 3.1" data-md-level="2">
1558 <label class="md-nav__title" for="__nav_6_3">
1559 <span class="md-nav__icon md-icon"></span>
1560 Migrating from WSC 3.1
1561 </label>
1562 <ul class="md-nav__list" data-md-scrollfix>
1563
1564
1565
1566
1567
1568 <li class="md-nav__item">
1569 <a href="../../migration/wsc31/php/" class="md-nav__link">
1570 PHP API
1571 </a>
1572 </li>
1573
1574
1575
1576 </ul>
1577 </nav>
1578 </li>
1579
1580
1581
1582
1583
1584
1585
1586
1587 <li class="md-nav__item md-nav__item--nested">
1588
1589
1590 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6_4" type="checkbox" id="__nav_6_4" >
1591
1592 <label class="md-nav__link" for="__nav_6_4">
1593 Migrating from WSC 3.0
1594 <span class="md-nav__icon md-icon"></span>
1595 </label>
1596 <nav class="md-nav" aria-label="Migrating from WSC 3.0" data-md-level="2">
1597 <label class="md-nav__title" for="__nav_6_4">
1598 <span class="md-nav__icon md-icon"></span>
1599 Migrating from WSC 3.0
1600 </label>
1601 <ul class="md-nav__list" data-md-scrollfix>
1602
1603
1604
1605
1606
1607 <li class="md-nav__item">
1608 <a href="../../migration/wsc30/php/" class="md-nav__link">
1609 PHP API
1610 </a>
1611 </li>
1612
1613
1614
1615
1616
1617
1618
1619 <li class="md-nav__item">
1620 <a href="../../migration/wsc30/javascript/" class="md-nav__link">
1621 JavaScript API
1622 </a>
1623 </li>
1624
1625
1626
1627
1628
1629
1630
1631 <li class="md-nav__item">
1632 <a href="../../migration/wsc30/templates/" class="md-nav__link">
1633 Templates
1634 </a>
1635 </li>
1636
1637
1638
1639
1640
1641
1642
1643 <li class="md-nav__item">
1644 <a href="../../migration/wsc30/css/" class="md-nav__link">
1645 CSS
1646 </a>
1647 </li>
1648
1649
1650
1651
1652
1653
1654
1655 <li class="md-nav__item">
1656 <a href="../../migration/wsc30/package/" class="md-nav__link">
1657 Package Components
1658 </a>
1659 </li>
1660
1661
1662
1663 </ul>
1664 </nav>
1665 </li>
1666
1667
1668
1669
1670
1671
1672
1673
1674 <li class="md-nav__item md-nav__item--nested">
1675
1676
1677 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6_5" type="checkbox" id="__nav_6_5" >
1678
1679 <label class="md-nav__link" for="__nav_6_5">
1680 Migrating from WCF 2.1
1681 <span class="md-nav__icon md-icon"></span>
1682 </label>
1683 <nav class="md-nav" aria-label="Migrating from WCF 2.1" data-md-level="2">
1684 <label class="md-nav__title" for="__nav_6_5">
1685 <span class="md-nav__icon md-icon"></span>
1686 Migrating from WCF 2.1
1687 </label>
1688 <ul class="md-nav__list" data-md-scrollfix>
1689
1690
1691
1692
1693
1694 <li class="md-nav__item">
1695 <a href="../../migration/wcf21/php/" class="md-nav__link">
1696 PHP API
1697 </a>
1698 </li>
1699
1700
1701
1702
1703
1704
1705
1706 <li class="md-nav__item">
1707 <a href="../../migration/wcf21/templates/" class="md-nav__link">
1708 Templates
1709 </a>
1710 </li>
1711
1712
1713
1714
1715
1716
1717
1718 <li class="md-nav__item">
1719 <a href="../../migration/wcf21/css/" class="md-nav__link">
1720 CSS
1721 </a>
1722 </li>
1723
1724
1725
1726
1727
1728
1729
1730 <li class="md-nav__item">
1731 <a href="../../migration/wcf21/package/" class="md-nav__link">
1732 Package Components
1733 </a>
1734 </li>
1735
1736
1737
1738 </ul>
1739 </nav>
1740 </li>
1741
1742
1743
1744 </ul>
1745 </nav>
1746 </li>
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758 <li class="md-nav__item md-nav__item--nested">
1759
1760
1761 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" >
1762
1763 <label class="md-nav__link" for="__nav_7">
1764 Tutorials
1765 <span class="md-nav__icon md-icon"></span>
1766 </label>
1767 <nav class="md-nav" aria-label="Tutorials" data-md-level="1">
1768 <label class="md-nav__title" for="__nav_7">
1769 <span class="md-nav__icon md-icon"></span>
1770 Tutorials
1771 </label>
1772 <ul class="md-nav__list" data-md-scrollfix>
1773
1774
1775
1776
1777
1778
1779 <li class="md-nav__item md-nav__item--nested">
1780
1781
1782 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7_1" type="checkbox" id="__nav_7_1" >
1783
1784 <label class="md-nav__link" for="__nav_7_1">
1785 Tutorial Series
1786 <span class="md-nav__icon md-icon"></span>
1787 </label>
1788 <nav class="md-nav" aria-label="Tutorial Series" data-md-level="2">
1789 <label class="md-nav__title" for="__nav_7_1">
1790 <span class="md-nav__icon md-icon"></span>
1791 Tutorial Series
1792 </label>
1793 <ul class="md-nav__list" data-md-scrollfix>
1794
1795
1796
1797
1798
1799 <li class="md-nav__item">
1800 <a href="../../tutorial/series/overview/" class="md-nav__link">
1801 Overview
1802 </a>
1803 </li>
1804
1805
1806
1807
1808
1809
1810
1811 <li class="md-nav__item">
1812 <a href="../../tutorial/series/part_1/" class="md-nav__link">
1813 Part 1
1814 </a>
1815 </li>
1816
1817
1818
1819
1820
1821
1822
1823 <li class="md-nav__item">
1824 <a href="../../tutorial/series/part_2/" class="md-nav__link">
1825 Part 2
1826 </a>
1827 </li>
1828
1829
1830
1831
1832
1833
1834
1835 <li class="md-nav__item">
1836 <a href="../../tutorial/series/part_3/" class="md-nav__link">
1837 Part 3
1838 </a>
1839 </li>
1840
1841
1842
1843
1844
1845
1846
1847 <li class="md-nav__item">
1848 <a href="../../tutorial/series/part_4/" class="md-nav__link">
1849 Part 4
1850 </a>
1851 </li>
1852
1853
1854
1855
1856
1857
1858
1859 <li class="md-nav__item">
1860 <a href="../../tutorial/series/part_5/" class="md-nav__link">
1861 Part 5
1862 </a>
1863 </li>
1864
1865
1866
1867 </ul>
1868 </nav>
1869 </li>
1870
1871
1872
1873 </ul>
1874 </nav>
1875 </li>
1876
1877
1878
1879 </ul>
1880 </nav>
1881 </div>
1882 </div>
1883 </div>
1884
1885
1886
1887 <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
1888 <div class="md-sidebar__scrollwrap">
1889 <div class="md-sidebar__inner">
1890
1891 <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
1892
1893
1894
1895
1896
1897
1898 <label class="md-nav__title" for="__toc">
1899 <span class="md-nav__icon md-icon"></span>
1900 Table of contents
1901 </label>
1902 <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
1903
1904 <li class="md-nav__item">
1905 <a href="#database-objects" class="md-nav__link">
1906 Database Objects
1907 </a>
1908
1909 <nav class="md-nav" aria-label="Database Objects">
1910 <ul class="md-nav__list">
1911
1912 <li class="md-nav__item">
1913 <a href="#database-table-columns-as-properties" class="md-nav__link">
1914 Database Table Columns as Properties
1915 </a>
1916
1917 </li>
1918
1919 </ul>
1920 </nav>
1921
1922 </li>
1923
1924 <li class="md-nav__item">
1925 <a href="#database-object-editors" class="md-nav__link">
1926 Database Object Editors
1927 </a>
1928
1929 <nav class="md-nav" aria-label="Database Object Editors">
1930 <ul class="md-nav__list">
1931
1932 <li class="md-nav__item">
1933 <a href="#class-tags" class="md-nav__link">
1934 Class Tags
1935 </a>
1936
1937 </li>
1938
1939 </ul>
1940 </nav>
1941
1942 </li>
1943
1944 <li class="md-nav__item">
1945 <a href="#runtime-caches" class="md-nav__link">
1946 Runtime Caches
1947 </a>
1948
1949 <nav class="md-nav" aria-label="Runtime Caches">
1950 <ul class="md-nav__list">
1951
1952 <li class="md-nav__item">
1953 <a href="#class-tags_1" class="md-nav__link">
1954 Class Tags
1955 </a>
1956
1957 </li>
1958
1959 </ul>
1960 </nav>
1961
1962 </li>
1963
1964 </ul>
1965
1966 </nav>
1967 </div>
1968 </div>
1969 </div>
1970
1971
1972 <div class="md-content" data-md-component="content">
1973 <article class="md-content__inner md-typeset">
1974
1975
1976 <a href="https://github.com/WoltLab/docs.woltlab.com/edit/5.4/docs/php/code-style-documentation.md" title="Edit this page" class="md-content__button md-icon">
1977 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
1978 </a>
1979
1980
1981 <h1 id="documentation">Documentation<a class="headerlink" href="#documentation" title="Permanent link">#</a></h1>
1982 <div class="admonition info">
1983 <p class="admonition-title">The following documentation conventions are used by us for our own packages. While you do not have to follow every rule, you are encouraged to do so.</p>
1984 </div>
1985 <h2 id="database-objects">Database Objects<a class="headerlink" href="#database-objects" title="Permanent link">#</a></h2>
1986 <h3 id="database-table-columns-as-properties">Database Table Columns as Properties<a class="headerlink" href="#database-table-columns-as-properties" title="Permanent link">#</a></h3>
1987 <p>As the database table columns are not explicit properties of the classes extending <code>wcf\data\DatabaseObject</code> but rather stored in <code>DatabaseObject::$data</code> and accessible via <code>DatabaseObject::__get($name)</code>, the IDE we use, PhpStorm, is neither able to autocomplete such property access nor to interfere the type of the property.</p>
1988 <p>To solve this problem, <code>@property-read</code> tags must be added to the class documentation which registers the database table columns as public read-only properties:</p>
1989 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><code> * @property-read propertyType $propertyName property description
1990 </code></pre></div>
1991 </td></tr></table>
1992 <p>The properties have to be in the same order as the order in the database table.</p>
1993 <p>The following table provides templates for common description texts so that similar database table columns have similar description texts.</p>
1994 <table>
1995 <thead>
1996 <tr>
1997 <th>property</th>
1998 <th>description template and example</th>
1999 </tr>
2000 </thead>
2001 <tbody>
2002 <tr>
2003 <td>unique object id</td>
2004 <td><code>unique id of the {object name}</code><br><strong>example:</strong> <code>unique id of the acl option</code></td>
2005 </tr>
2006 <tr>
2007 <td>id of the delivering package</td>
2008 <td><code>id of the package which delivers the {object name}</code><br><strong>example:</strong> <code>id of the package which delivers the acl option</code></td>
2009 </tr>
2010 <tr>
2011 <td>show order for nested structure</td>
2012 <td><code>position of the {object name} in relation to its siblings</code><br><strong>example:</strong> <code>position of the ACP menu item in relation to its siblings</code></td>
2013 </tr>
2014 <tr>
2015 <td>show order within different object</td>
2016 <td><code>position of the {object name} in relation to the other {object name}s in the {parent object name}</code><br><strong>example:</strong> <code>position of the label in relation to the other labels in the label group</code></td>
2017 </tr>
2018 <tr>
2019 <td>required permissions</td>
2020 <td><code>comma separated list of user group permissions of which the active user needs to have at least one to see (access, …) the {object name}</code><br><strong>example:</strong><code>comma separated list of user group permissions of which the active user needs to have at least one to see the ACP menu item</code></td>
2021 </tr>
2022 <tr>
2023 <td>required options</td>
2024 <td><code>comma separated list of options of which at least one needs to be enabled for the {object name} to be shown (accessible, …)</code><br><strong>example:</strong><code>comma separated list of options of which at least one needs to be enabled for the ACP menu item to be shown</code></td>
2025 </tr>
2026 <tr>
2027 <td>id of the user who has created the object</td>
2028 <td><code>id of the user who created (wrote, …) the {object name} (or `null` if the user does not exist anymore (or if the {object name} has been created by a guest))</code><br><strong>example:</strong><code>id of the user who wrote the comment or `null` if the user does not exist anymore or if the comment has been written by a guest</code></td>
2029 </tr>
2030 <tr>
2031 <td>name of the user who has created the object</td>
2032 <td><code>name of the user (or guest) who created (wrote, …) the {object name}</code><br><strong>example:</strong><code>name of the user or guest who wrote the comment</code></td>
2033 </tr>
2034 <tr>
2035 <td>additional data</td>
2036 <td><code>array with additional data of the {object name}</code><br><strong>example:</strong><code>array with additional data of the user activity event</code></td>
2037 </tr>
2038 <tr>
2039 <td>time-related columns</td>
2040 <td><code>timestamp at which the {object name} has been created (written, …)</code><br><strong>example:</strong><code>timestamp at which the comment has been written</code></td>
2041 </tr>
2042 <tr>
2043 <td>boolean options</td>
2044 <td><code>is `1` (or `0`) if the {object name} … (and thus …), otherwise `0` (or `1`)</code><br><strong>example:</strong><code>is `1` if the ad is disabled and thus not shown, otherwise `0`</code></td>
2045 </tr>
2046 <tr>
2047 <td><code>$cumulativeLikes</code></td>
2048 <td><code>cumulative result of likes (counting `+1`) and dislikes (counting `-1`) for the {object name}</code><br><strong>example:</strong><code>cumulative result of likes (counting `+1`) and dislikes (counting `-1`) for the article</code></td>
2049 </tr>
2050 <tr>
2051 <td><code>$comments</code></td>
2052 <td><code>number of comments on the {object name}</code><br><strong>example:</strong><code>number of comments on the article</code></td>
2053 </tr>
2054 <tr>
2055 <td><code>$views</code></td>
2056 <td><code>number of times the {object name} has been viewed</code><br><strong>example:</strong><code>number of times the article has been viewed</code></td>
2057 </tr>
2058 <tr>
2059 <td>text field with potential language item name as value</td>
2060 <td><code>{text type} of the {object name} or name of language item which contains the {text type}</code><br><strong>example:</strong><code>description of the cronjob or name of language item which contains the description</code></td>
2061 </tr>
2062 <tr>
2063 <td><code>$objectTypeID</code></td>
2064 <td><code>id of the `{object type definition name}` object type</code><br><strong>example:</strong><code>id of the `com.woltlab.wcf.modifiableContent` object type</code></td>
2065 </tr>
2066 </tbody>
2067 </table>
2068 <h2 id="database-object-editors">Database Object Editors<a class="headerlink" href="#database-object-editors" title="Permanent link">#</a></h2>
2069 <h3 id="class-tags">Class Tags<a class="headerlink" href="#class-tags" title="Permanent link">#</a></h3>
2070 <p>Any database object editor class comment must have to following tags to properly support autocompletion by IDEs:</p>
2071 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
2072 <span class="normal">2</span>
2073 <span class="normal">3</span>
2074 <span class="normal">4</span>
2075 <span class="normal">5</span>
2076 <span class="normal">6</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><code><span class="sd">/**</span>
2077 <span class="sd"> * …</span>
2078 <span class="sd"> * @method static {DBO class name} create(array $parameters = [])</span>
2079 <span class="sd"> * @method {DBO class name} getDecoratedObject()</span>
2080 <span class="sd"> * @mixin {DBO class name}</span>
2081 <span class="sd"> */</span>
2082 </code></pre></div>
2083 </td></tr></table>
2084 <p>The only exception to this rule is if the class overwrites the <code>create()</code> method which itself has to be properly documentation then.</p>
2085 <p>The first and second line makes sure that when calling the <code>create()</code> or <code>getDecoratedObject()</code> method, the return value is correctly recognized and not just a general <code>DatabaseObject</code> instance.
2086 The third line tells the IDE (if <code>@mixin</code> is supported) that the database object editor decorates the database object and therefore offers autocompletion for properties and methods from the database object class itself.</p>
2087 <h2 id="runtime-caches">Runtime Caches<a class="headerlink" href="#runtime-caches" title="Permanent link">#</a></h2>
2088 <h3 id="class-tags_1">Class Tags<a class="headerlink" href="#class-tags_1" title="Permanent link">#</a></h3>
2089 <p>Any class implementing the <a href="https://github.com/WoltLab/WCF/blob/master/wcfsetup/install/files/lib/system/cache/runtime/IRuntimeCache.class.php">IRuntimeCache</a> interface must have the following class tags:</p>
2090 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
2091 <span class="normal">2</span>
2092 <span class="normal">3</span>
2093 <span class="normal">4</span>
2094 <span class="normal">5</span>
2095 <span class="normal">6</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><code><span class="sd">/**</span>
2096 <span class="sd"> * …</span>
2097 <span class="sd"> * @method {DBO class name}[] getCachedObjects()</span>
2098 <span class="sd"> * @method {DBO class name} getObject($objectID)</span>
2099 <span class="sd"> * @method {DBO class name}[] getObjects(array $objectIDs)</span>
2100 <span class="sd"> */</span>
2101 </code></pre></div>
2102 </td></tr></table>
2103 <p>These tags ensure that when calling any of the mentioned methods, the return value refers to the concrete database object and not just generically to <a href="https://github.com/WoltLab/WCF/blob/master/wcfsetup/install/files/lib/data/DatabaseObject.class.php">DatabaseObject</a>.</p>
2104
2105
2106
2107
2108 <hr>
2109 <div class="md-source-date">
2110 <small>
2111
2112 Last update: 2021-01-08
2113
2114 </small>
2115 </div>
2116
2117
2118
2119
2120
2121
2122
2123
2124 </article>
2125 </div>
2126 </div>
2127
2128 </main>
2129
2130
2131 <footer class="md-footer">
2132
2133 <div class="md-footer-meta md-typeset">
2134 <div class="md-footer-meta__inner md-grid">
2135 <div class="md-footer-copyright">
2136
2137 <div class="md-footer-copyright__highlight">
2138 Copyright © 2020 WoltLab GmbH
2139 </div>
2140
2141 Made with
2142 <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
2143 Material for MkDocs
2144 </a>
2145
2146 </div>
2147 <div class="md-footer-copyright">
2148 <a href="https://www.woltlab.com/legal-notice/">Legal Notice</a>
2149 <a href="https://www.woltlab.com/privacy-policy/">Privacy Policy</a>
2150 </div>
2151 </div>
2152 </div>
2153 </footer>
2154
2155 </div>
2156 <div class="md-dialog" data-md-component="dialog">
2157 <div class="md-dialog__inner md-typeset"></div>
2158 </div>
2159 <script id="__config" type="application/json">{"base": "../..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}, "search": "../../assets/javascripts/workers/search.fe42c31b.min.js", "version": {"provider": "mike"}}</script>
2160
2161
2162 <script src="../../assets/javascripts/bundle.4ea5477f.min.js"></script>
2163
2164
2165 </body>
2166 </html>