3 final class PhabricatorPhurlApplication
extends PhabricatorApplication
{
5 public function getName() {
9 public function getShortDescription() {
10 return pht('URL Shortener');
13 public function getFlavorText() {
14 return pht('Shorten your favorite URL.');
17 public function getBaseURI() {
21 public function getIcon() {
25 public function isPrototype() {
29 public function getApplicationGroup() {
30 return self
::GROUP_UTILITIES
;
33 public function getRemarkupRules() {
35 new PhabricatorPhurlRemarkupRule(),
36 new PhabricatorPhurlLinkRemarkupRule(),
40 public function getRoutes() {
42 '/U(?P<id>[1-9]\d*)/?' => 'PhabricatorPhurlURLViewController',
43 '/u/(?P<id>[1-9]\d*)/?' => 'PhabricatorPhurlURLAccessController',
44 '/u/(?P<alias>[^/]+)/?' => 'PhabricatorPhurlURLAccessController',
46 '(?:query/(?P<queryKey>[^/]+)/)?'
47 => 'PhabricatorPhurlURLListController',
49 $this->getEditRoutePattern('edit/')
50 => 'PhabricatorPhurlURLEditController',
56 public function getShortRoutes() {
58 '/status/' => 'PhabricatorStatusController',
59 '/favicon.ico' => 'PhabricatorFaviconController',
60 '/robots.txt' => 'PhabricatorRobotsShortController',
62 '/u/(?P<append>[^/]+)' => 'PhabricatorPhurlShortURLController',
63 '.*' => 'PhabricatorPhurlShortURLDefaultController',
67 protected function getCustomCapabilities() {
69 PhabricatorPhurlURLCreateCapability
::CAPABILITY
=> array(
70 'default' => PhabricatorPolicies
::POLICY_USER
,