2015-07-24 20:06:27 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorPhurlApplication extends PhabricatorApplication {
|
|
|
|
|
|
|
|
public function getName() {
|
|
|
|
return pht('Phurl');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getShortDescription() {
|
|
|
|
return pht('URL Shortener');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getFlavorText() {
|
|
|
|
return pht('Shorten your favorite URL.');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getBaseURI() {
|
|
|
|
return '/phurl/';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getFontIcon() {
|
|
|
|
return 'fa-compress';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function isPrototype() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRoutes() {
|
|
|
|
return array(
|
|
|
|
'/U(?P<id>[1-9]\d*)' => 'PhabricatorPhurlURLViewController',
|
2015-11-02 21:08:47 +01:00
|
|
|
'/u/(?P<id>[1-9]\d*)' => 'PhabricatorPhurlURLAccessController',
|
2015-11-03 19:41:03 +01:00
|
|
|
'/u/(?P<alias>[^/]+)' => 'PhabricatorPhurlURLAccessController',
|
2015-07-24 20:06:27 +02:00
|
|
|
'/phurl/' => array(
|
|
|
|
'(?:query/(?P<queryKey>[^/]+)/)?'
|
|
|
|
=> 'PhabricatorPhurlURLListController',
|
|
|
|
'url/' => array(
|
|
|
|
'create/'
|
|
|
|
=> 'PhabricatorPhurlURLEditController',
|
|
|
|
'edit/(?P<id>[1-9]\d*)/'
|
|
|
|
=> 'PhabricatorPhurlURLEditController',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|