@@ -225,7 +225,7 @@ <h4 id="toc-methods">
225225 < dt class ="phpdocumentor-table-of-contents__entry -method -public ">
226226 < a class ="" href ="classes/ParsedownToC.html#method_contentsList "> contentsList()</ a >
227227 < span >
228- : false|string </ span >
228+ : false|string|array<string|int, mixed> </ span >
229229</ dt >
230230< dd > Returns the parsed ToC.</ dd >
231231
@@ -251,6 +251,13 @@ <h4 id="toc-methods">
251251< dd > Heading process. It retruns the heading block element if the given $Line
252252is a heading element.</ dd >
253253
254+ < dt class ="phpdocumentor-table-of-contents__entry -method -protected ">
255+ < a class ="" href ="classes/ParsedownToC.html#method_buildNestedToc "> buildNestedToc()</ a >
256+ < span >
257+ : array<string|int, mixed> </ span >
258+ </ dt >
259+ < dd > Build hierarchical ToC from a flat toc array.</ dd >
260+
254261 < dt class ="phpdocumentor-table-of-contents__entry -method -protected ">
255262 < a class ="" href ="classes/ParsedownToC.html#method_createAnchorID "> createAnchorID()</ a >
256263 < span >
@@ -701,7 +708,7 @@ <h4 class="phpdocumentor-element__name" id="method_body">
701708 < aside class ="phpdocumentor-element-found-in ">
702709 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
703710 :
704- < span class ="phpdocumentor-element-found-in__line "> 185 </ span >
711+ < span class ="phpdocumentor-element-found-in__line "> 244 </ span >
705712
706713 </ aside >
707714
@@ -766,15 +773,15 @@ <h4 class="phpdocumentor-element__name" id="method_contentsList">
766773 < aside class ="phpdocumentor-element-found-in ">
767774 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
768775 :
769- < span class ="phpdocumentor-element-found-in__line "> 213 </ span >
776+ < span class ="phpdocumentor-element-found-in__line "> 272 </ span >
770777
771778 </ aside >
772779
773780 < p class ="phpdocumentor-summary "> Returns the parsed ToC.</ p >
774781
775782 < code class ="phpdocumentor-code phpdocumentor-signature ">
776783 < span class ="phpdocumentor-signature__visibility "> public</ span >
777- < span class ="phpdocumentor-signature__name "> contentsList</ span > < span > (</ span > < span class ="phpdocumentor-signature__argument "> < span > [</ span > < span class ="phpdocumentor-signature__argument__return-type "> string </ span > < span class ="phpdocumentor-signature__argument__name "> $type_return</ span > < span > = </ span > < span class ="phpdocumentor-signature__argument__default-value "> 'string'</ span > < span > ]</ span > </ span > < span > )</ span > < span > : </ span > < span class ="phpdocumentor-signature__response_type "> false|string</ span > </ code >
784+ < span class ="phpdocumentor-signature__name "> contentsList</ span > < span > (</ span > < span class ="phpdocumentor-signature__argument "> < span > [</ span > < span class ="phpdocumentor-signature__argument__return-type "> string </ span > < span class ="phpdocumentor-signature__argument__name "> $type_return</ span > < span > = </ span > < span class ="phpdocumentor-signature__argument__default-value "> 'string'</ span > < span > ]</ span > </ span > < span > )</ span > < span > : </ span > < span class ="phpdocumentor-signature__response_type "> false|string|array<string|int, mixed> </ span > </ code >
778785
779786 < div class ="phpdocumentor-label-line ">
780787 </ div >
@@ -789,7 +796,7 @@ <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
789796 : < span class ="phpdocumentor-signature__argument__return-type "> string</ span >
790797 = < span class ="phpdocumentor-signature__argument__default-value "> 'string'</ span > </ dt >
791798 < dd class ="phpdocumentor-argument-list__definition ">
792- < section class ="phpdocumentor-description "> < p > Type of the return format. "string" or "json".</ p >
799+ < section class ="phpdocumentor-description "> < p > Type of the return format. "string", "json", "flatarray" and "nestedarray ".</ p >
793800</ section >
794801
795802 </ dd >
@@ -801,9 +808,9 @@ <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
801808
802809 < section >
803810 < h5 class ="phpdocumentor-return-value__heading "> Return values</ h5 >
804- < span class ="phpdocumentor-signature__response_type "> false|string</ span >
811+ < span class ="phpdocumentor-signature__response_type "> false|string|array<string|int, mixed> </ span >
805812 —
806- < section class ="phpdocumentor-description "> < p > HTML/JSON string of ToC .</ p >
813+ < section class ="phpdocumentor-description "> < p > ToC in HTML/JSON format string or array .</ p >
807814</ section >
808815
809816 </ section >
@@ -823,7 +830,7 @@ <h4 class="phpdocumentor-element__name" id="method_setTagToc">
823830 < aside class ="phpdocumentor-element-found-in ">
824831 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
825832 :
826- < span class ="phpdocumentor-element-found-in__line "> 451 </ span >
833+ < span class ="phpdocumentor-element-found-in__line "> 518 </ span >
827834
828835 </ aside >
829836
@@ -868,7 +875,7 @@ <h4 class="phpdocumentor-element__name" id="method_text">
868875 < aside class ="phpdocumentor-element-found-in ">
869876 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
870877 :
871- < span class ="phpdocumentor-element-found-in__line "> 475 </ span >
878+ < span class ="phpdocumentor-element-found-in__line "> 542 </ span >
872879
873880 </ aside >
874881
@@ -930,7 +937,7 @@ <h4 class="phpdocumentor-element__name" id="method_blockHeader">
930937 < aside class ="phpdocumentor-element-found-in ">
931938 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
932939 :
933- < span class ="phpdocumentor-element-found-in__line "> 116 </ span >
940+ < span class ="phpdocumentor-element-found-in__line "> 175 </ span >
934941
935942 </ aside >
936943
@@ -1001,6 +1008,61 @@ <h5 class="phpdocumentor-return-value__heading">Return values</h5>
10011008
10021009 </ section >
10031010
1011+ </ article >
1012+ < article
1013+ class ="phpdocumentor-element
1014+ -method
1015+ -protected
1016+ "
1017+ >
1018+ < h4 class ="phpdocumentor-element__name " id ="method_buildNestedToc ">
1019+ buildNestedToc()
1020+ < a href ="classes/ParsedownToC.html#method_buildNestedToc " class ="headerlink "> < i class ="fas fa-link "> </ i > </ a >
1021+
1022+ </ h4 >
1023+ < aside class ="phpdocumentor-element-found-in ">
1024+ < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
1025+ :
1026+ < span class ="phpdocumentor-element-found-in__line "> 110</ span >
1027+
1028+ </ aside >
1029+
1030+ < p class ="phpdocumentor-summary "> Build hierarchical ToC from a flat toc array.</ p >
1031+
1032+ < code class ="phpdocumentor-code phpdocumentor-signature ">
1033+ < span class ="phpdocumentor-signature__visibility "> protected</ span >
1034+ < span class ="phpdocumentor-signature__name "> buildNestedToc</ span > < span > (</ span > < span class ="phpdocumentor-signature__argument "> < span class ="phpdocumentor-signature__argument__return-type "> array<string|int, mixed> </ span > < span class ="phpdocumentor-signature__argument__name "> $flatToc</ span > </ span > < span > )</ span > < span > : </ span > < span class ="phpdocumentor-signature__response_type "> array<string|int, mixed></ span > </ code >
1035+
1036+ < div class ="phpdocumentor-label-line ">
1037+ </ div >
1038+
1039+
1040+ < h5 class ="phpdocumentor-argument-list__heading "> Parameters</ h5 >
1041+ < dl class ="phpdocumentor-argument-list ">
1042+ < dt class ="phpdocumentor-argument-list__entry ">
1043+ < span class ="phpdocumentor-signature__argument__name "> $flatToc</ span >
1044+ : < span class ="phpdocumentor-signature__argument__return-type "> array<string|int, mixed></ span >
1045+ </ dt >
1046+ < dd class ="phpdocumentor-argument-list__definition ">
1047+ < section class ="phpdocumentor-description "> < p > Flat list of toc entries.</ p >
1048+ </ section >
1049+
1050+ </ dd >
1051+ </ dl >
1052+
1053+
1054+
1055+
1056+
1057+ < section >
1058+ < h5 class ="phpdocumentor-return-value__heading "> Return values</ h5 >
1059+ < span class ="phpdocumentor-signature__response_type "> array<string|int, mixed></ span >
1060+ —
1061+ < section class ="phpdocumentor-description "> < p > Hierarchical toc as nested array.</ p >
1062+ </ section >
1063+
1064+ </ section >
1065+
10041066</ article >
10051067 < article
10061068 class ="phpdocumentor-element
@@ -1016,7 +1078,7 @@ <h4 class="phpdocumentor-element__name" id="method_createAnchorID">
10161078 < aside class ="phpdocumentor-element-found-in ">
10171079 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
10181080 :
1019- < span class ="phpdocumentor-element-found-in__line "> 246 </ span >
1081+ < span class ="phpdocumentor-element-found-in__line "> 313 </ span >
10201082
10211083 </ aside >
10221084
@@ -1066,7 +1128,7 @@ <h4 class="phpdocumentor-element__name" id="method_decodeTagFromHash">
10661128 < aside class ="phpdocumentor-element-found-in ">
10671129 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
10681130 :
1069- < span class ="phpdocumentor-element-found-in__line "> 261 </ span >
1131+ < span class ="phpdocumentor-element-found-in__line "> 328 </ span >
10701132
10711133 </ aside >
10721134
@@ -1119,7 +1181,7 @@ <h4 class="phpdocumentor-element__name" id="method_encodeTagToHash">
11191181 < aside class ="phpdocumentor-element-found-in ">
11201182 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
11211183 :
1122- < span class ="phpdocumentor-element-found-in__line "> 284 </ span >
1184+ < span class ="phpdocumentor-element-found-in__line "> 351 </ span >
11231185
11241186 </ aside >
11251187
@@ -1172,7 +1234,7 @@ <h4 class="phpdocumentor-element__name" id="method_fetchText">
11721234 < aside class ="phpdocumentor-element-found-in ">
11731235 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
11741236 :
1175- < span class ="phpdocumentor-element-found-in__line "> 310 </ span >
1237+ < span class ="phpdocumentor-element-found-in__line "> 377 </ span >
11761238
11771239 </ aside >
11781240
@@ -1249,7 +1311,7 @@ <h4 class="phpdocumentor-element__name" id="method_getIdAttributeToC">
12491311 < aside class ="phpdocumentor-element-found-in ">
12501312 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
12511313 :
1252- < span class ="phpdocumentor-element-found-in__line "> 326 </ span >
1314+ < span class ="phpdocumentor-element-found-in__line "> 393 </ span >
12531315
12541316 </ aside >
12551317
@@ -1288,7 +1350,7 @@ <h4 class="phpdocumentor-element__name" id="method_getSalt">
12881350 < aside class ="phpdocumentor-element-found-in ">
12891351 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
12901352 :
1291- < span class ="phpdocumentor-element-found-in__line "> 340 </ span >
1353+ < span class ="phpdocumentor-element-found-in__line "> 407 </ span >
12921354
12931355 </ aside >
12941356
@@ -1327,7 +1389,7 @@ <h4 class="phpdocumentor-element__name" id="method_getTagToC">
13271389 < aside class ="phpdocumentor-element-found-in ">
13281390 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
13291391 :
1330- < span class ="phpdocumentor-element-found-in__line "> 357 </ span >
1392+ < span class ="phpdocumentor-element-found-in__line "> 424 </ span >
13311393
13321394 </ aside >
13331395
@@ -1366,7 +1428,7 @@ <h4 class="phpdocumentor-element__name" id="method_getTextOnly">
13661428 < aside class ="phpdocumentor-element-found-in ">
13671429 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
13681430 :
1369- < span class ="phpdocumentor-element-found-in__line "> 374 </ span >
1431+ < span class ="phpdocumentor-element-found-in__line "> 441 </ span >
13701432
13711433 </ aside >
13721434
@@ -1419,7 +1481,7 @@ <h4 class="phpdocumentor-element__name" id="method_setContentsList">
14191481 < aside class ="phpdocumentor-element-found-in ">
14201482 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
14211483 :
1422- < span class ="phpdocumentor-element-found-in__line "> 391 </ span >
1484+ < span class ="phpdocumentor-element-found-in__line "> 458 </ span >
14231485
14241486 </ aside >
14251487
@@ -1466,7 +1528,7 @@ <h4 class="phpdocumentor-element__name" id="method_setContentsListAsArray">
14661528 < aside class ="phpdocumentor-element-found-in ">
14671529 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
14681530 :
1469- < span class ="phpdocumentor-element-found-in__line "> 405 </ span >
1531+ < span class ="phpdocumentor-element-found-in__line "> 472 </ span >
14701532
14711533 </ aside >
14721534
@@ -1511,7 +1573,7 @@ <h4 class="phpdocumentor-element__name" id="method_setContentsListAsString">
15111573 < aside class ="phpdocumentor-element-found-in ">
15121574 < abbr class ="phpdocumentor-element-found-in__file " title ="Extension.php "> < a href ="files/extension.html "> Extension.php</ a > </ abbr >
15131575 :
1514- < span class ="phpdocumentor-element-found-in__line "> 416 </ span >
1576+ < span class ="phpdocumentor-element-found-in__line "> 483 </ span >
15151577
15161578 </ aside >
15171579
@@ -1683,6 +1745,7 @@ <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
16831745 < li class =""> < a href ="classes/ParsedownToC.html#method_setTagToc "> setTagToc()</ a > </ li >
16841746 < li class =""> < a href ="classes/ParsedownToC.html#method_text "> text()</ a > </ li >
16851747 < li class =""> < a href ="classes/ParsedownToC.html#method_blockHeader "> blockHeader()</ a > </ li >
1748+ < li class =""> < a href ="classes/ParsedownToC.html#method_buildNestedToc "> buildNestedToc()</ a > </ li >
16861749 < li class =""> < a href ="classes/ParsedownToC.html#method_createAnchorID "> createAnchorID()</ a > </ li >
16871750 < li class =""> < a href ="classes/ParsedownToC.html#method_decodeTagFromHash "> decodeTagFromHash()</ a > </ li >
16881751 < li class =""> < a href ="classes/ParsedownToC.html#method_encodeTagToHash "> encodeTagToHash()</ a > </ li >
0 commit comments