Skip to content

Commit f2ee306

Browse files
authored
Update TSitemap.php
1 parent 3a83ab5 commit f2ee306

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/TI/TSitemap.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
trait TSitemap
1818
{
19-
public function getSitemap() : array
19+
public static function getSitemap() : array
2020
{
2121
$pages = [];
2222

@@ -32,7 +32,16 @@ public function getSitemap() : array
3232
continue;
3333
}
3434

35-
$pages[] = ":{$this->getName()}:" . lcfirst(substr($method->name, 6));
35+
$regex = '/App\\\\([A-Z][a-z]*)Module\\\\Presenter\\\\([A-Z][a-z]*)Presenter/';
36+
$matches = [];
37+
preg_match($regex, $reflection->name, $matches);
38+
39+
if (\count($matches) < 3)
40+
{
41+
continue;
42+
}
43+
44+
$pages[] = ":{$matches[1]}:{$matches[2]}:" . lcfirst(substr($method->name, 6));
3645
}
3746

3847
return $pages;

0 commit comments

Comments
 (0)