@@ -1487,14 +1487,10 @@ public function getMethodSynopsisElement(array $funcMap, array $aliasMap, DOMDoc
1487
1487
1488
1488
$ methodSynopsis = $ doc ->createElement ($ synopsisType );
1489
1489
1490
- $ aliasedFunc = $ this ->aliasType === "alias " && isset ($ funcMap [$ this ->alias ->__toString ()]) ? $ funcMap [$ this ->alias ->__toString ()] : null ;
1491
- $ aliasFunc = $ aliasMap [$ this ->name ->__toString ()] ?? null ;
1492
-
1493
- if (($ this ->aliasType === "alias " && $ aliasedFunc !== null && $ aliasedFunc ->isMethod () !== $ this ->isMethod ()) ||
1494
- ($ aliasFunc !== null && $ aliasFunc ->isMethod () !== $ this ->isMethod ())
1495
- ) {
1490
+ if ($ this ->isMethod ()) {
1491
+ assert ($ this ->name instanceof MethodName);
1496
1492
$ role = $ doc ->createAttribute ("role " );
1497
- $ role ->value = $ this ->isMethod () ? " oop " : " procedural " ;
1493
+ $ role ->value = addslashes ( $ this ->name -> className -> __toString ()) ;
1498
1494
$ methodSynopsis ->appendChild ($ role );
1499
1495
}
1500
1496
@@ -2766,19 +2762,20 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera
2766
2762
$ classSynopsis ->appendChild ($ classSynopsisInfo );
2767
2763
2768
2764
$ classReference = self ::getClassSynopsisReference ($ this ->name );
2765
+ $ escapedName = addslashes ($ this ->name ->__toString ());
2769
2766
2770
2767
$ classSynopsis ->appendChild (new DOMText ("\n " ));
2771
2768
$ includeElement = $ this ->createIncludeElement (
2772
2769
$ doc ,
2773
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not( @role='procedural') ]) "
2770
+ "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role=' $ escapedName ' ]) "
2774
2771
);
2775
2772
$ classSynopsis ->appendChild ($ includeElement );
2776
2773
2777
2774
if ($ this ->hasMethods ()) {
2778
2775
$ classSynopsis ->appendChild (new DOMText ("\n " ));
2779
2776
$ includeElement = $ this ->createIncludeElement (
2780
2777
$ doc ,
2781
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not( @role='procedural') ]) "
2778
+ "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role=' $ escapedName ' ]) "
2782
2779
);
2783
2780
$ classSynopsis ->appendChild ($ includeElement );
2784
2781
}
@@ -2787,7 +2784,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera
2787
2784
$ classSynopsis ->appendChild (new DOMText ("\n " ));
2788
2785
$ includeElement = $ this ->createIncludeElement (
2789
2786
$ doc ,
2790
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[not( @role='procedural') ]) "
2787
+ "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role=' $ escapedName ' ]) "
2791
2788
);
2792
2789
$ classSynopsis ->appendChild ($ includeElement );
2793
2790
}
@@ -2801,6 +2798,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera
2801
2798
foreach ($ parentsWithInheritedMethods as $ parent ) {
2802
2799
$ classSynopsis ->appendChild (new DOMText ("\n " ));
2803
2800
$ parentReference = self ::getClassSynopsisReference ($ parent );
2801
+ $ escapedParentName = addslashes ($ parent ->__toString ());
2804
2802
$ includeElement = $ this ->createIncludeElement (
2805
2803
$ doc ,
2806
2804
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role=' $ escapedParentName']) "
0 commit comments