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