Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / phurl / application / PhabricatorPhurlApplication.php
blob14ffda77f13d1153cfd131120a87dd81c8b15bbd
1 <?php
3 final class PhabricatorPhurlApplication extends PhabricatorApplication {
5 public function getName() {
6 return pht('Phurl');
9 public function getShortDescription() {
10 return pht('URL Shortener');
13 public function getFlavorText() {
14 return pht('Shorten your favorite URL.');
17 public function getBaseURI() {
18 return '/phurl/';
21 public function getIcon() {
22 return 'fa-compress';
25 public function isPrototype() {
26 return true;
29 public function getApplicationGroup() {
30 return self::GROUP_UTILITIES;
33 public function getRemarkupRules() {
34 return array(
35 new PhabricatorPhurlRemarkupRule(),
36 new PhabricatorPhurlLinkRemarkupRule(),
40 public function getRoutes() {
41 return array(
42 '/U(?P<id>[1-9]\d*)/?' => 'PhabricatorPhurlURLViewController',
43 '/u/(?P<id>[1-9]\d*)/?' => 'PhabricatorPhurlURLAccessController',
44 '/u/(?P<alias>[^/]+)/?' => 'PhabricatorPhurlURLAccessController',
45 '/phurl/' => array(
46 '(?:query/(?P<queryKey>[^/]+)/)?'
47 => 'PhabricatorPhurlURLListController',
48 'url/' => array(
49 $this->getEditRoutePattern('edit/')
50 => 'PhabricatorPhurlURLEditController',
56 public function getShortRoutes() {
57 return array(
58 '/status/' => 'PhabricatorStatusController',
59 '/favicon.ico' => 'PhabricatorFaviconController',
60 '/robots.txt' => 'PhabricatorRobotsShortController',
62 '/u/(?P<append>[^/]+)' => 'PhabricatorPhurlShortURLController',
63 '.*' => 'PhabricatorPhurlShortURLDefaultController',
67 protected function getCustomCapabilities() {
68 return array(
69 PhabricatorPhurlURLCreateCapability::CAPABILITY => array(
70 'default' => PhabricatorPolicies::POLICY_USER,