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