@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class PhabricatorPHPASTApplication extends PhabricatorApplication {
4
5 public function getName() {
6 return pht('PHPAST');
7 }
8
9 public function getBaseURI() {
10 return '/xhpast/';
11 }
12
13 public function getIcon() {
14 return 'fa-ambulance';
15 }
16
17 public function getShortDescription() {
18 return pht('Visual PHP Parser');
19 }
20
21 public function getTitleGlyph() {
22 return "\xE2\x96\xA0";
23 }
24
25 public function getApplicationGroup() {
26 return self::GROUP_DEVELOPER;
27 }
28
29 public function getRoutes() {
30 return array(
31 '/xhpast/' => array(
32 '' => 'PhabricatorXHPASTViewRunController',
33 'view/(?P<id>[1-9]\d*)/'
34 => 'PhabricatorXHPASTViewFrameController',
35 'frameset/(?P<id>[1-9]\d*)/'
36 => 'PhabricatorXHPASTViewFramesetController',
37 'input/(?P<id>[1-9]\d*)/'
38 => 'PhabricatorXHPASTViewInputController',
39 'tree/(?P<id>[1-9]\d*)/'
40 => 'PhabricatorXHPASTViewTreeController',
41 'stream/(?P<id>[1-9]\d*)/'
42 => 'PhabricatorXHPASTViewStreamController',
43 ),
44 '/phpast/' => array(
45 '' => PhorgePHPASTViewRunController::class,
46 'view/(?P<id>[1-9]\d*)/'
47 => PhorgePHPASTViewFrameController::class,
48 'frameset/(?P<id>[1-9]\d*)/'
49 => PhorgePHPASTViewFramesetController::class,
50 'input/(?P<id>[1-9]\d*)/'
51 => PhorgePHPASTViewInputController::class,
52 'tree/(?P<id>[1-9]\d*)/'
53 => PhorgePHPASTViewTreeController::class,
54 'stream/(?P<id>[1-9]\d*)/'
55 => PhorgePHPASTViewStreamController::class,
56 ),
57 );
58 }
59
60}