Improve some of the top-level application hooks and setup messages.

Summary:

Test Plan:

Reviewers:

CC:
This commit is contained in:
epriestley
2011-02-24 14:52:57 -08:00
parent dbb4653be3
commit 0114a29681
4 changed files with 82 additions and 42 deletions

View File

@@ -49,6 +49,8 @@ phutil_register_library_map(array(
'AphrontQueryObjectMissingException' => 'storage/exception/objectmissing',
'AphrontQueryParameterException' => 'storage/exception/parameter',
'AphrontQueryRecoverableException' => 'storage/exception/recoverable',
'AphrontReactiveListView' => 'view/reactive/list',
'AphrontReactiveObjectView' => 'view/reactive/object',
'AphrontRedirectException' => 'aphront/exception/redirect',
'AphrontRedirectResponse' => 'aphront/response/redirect',
'AphrontRequest' => 'aphront/request',
@@ -163,6 +165,12 @@ phutil_register_library_map(array(
'ManiphestTransactionType' => 'applications/maniphest/constants/transactiontype',
'Phabricator404Controller' => 'applications/base/controller/404',
'PhabricatorAuthController' => 'applications/auth/controller/base',
'PhabricatorCacophonyController' => 'applications/cacophony/controller/base',
'PhabricatorCacophonyDAO' => 'applications/cacophony/storage/base',
'PhabricatorCacophonyMessage' => 'applications/cacophony/storage/message',
'PhabricatorCacophonyMessageSaveController' => 'applications/cacophony/controller/messagesave',
'PhabricatorCacophonyTopic' => 'applications/cacophony/storage/topic',
'PhabricatorCacophonyTopicViewController' => 'applications/cacophony/controller/topicview',
'PhabricatorConduitAPIController' => 'applications/conduit/controller/api',
'PhabricatorConduitConnectionLog' => 'applications/conduit/storage/connectionlog',
'PhabricatorConduitConsoleController' => 'applications/conduit/controller/console',
@@ -342,6 +350,8 @@ phutil_register_library_map(array(
'AphrontQueryObjectMissingException' => 'AphrontQueryException',
'AphrontQueryParameterException' => 'AphrontQueryException',
'AphrontQueryRecoverableException' => 'AphrontQueryException',
'AphrontReactiveListView' => 'AphrontView',
'AphrontReactiveObjectView' => 'AphrontView',
'AphrontRedirectException' => 'AphrontException',
'AphrontRedirectResponse' => 'AphrontResponse',
'AphrontRequestFailureView' => 'AphrontView',
@@ -419,6 +429,12 @@ phutil_register_library_map(array(
'ManiphestTransactionSaveController' => 'ManiphestController',
'Phabricator404Controller' => 'PhabricatorController',
'PhabricatorAuthController' => 'PhabricatorController',
'PhabricatorCacophonyController' => 'PhabricatorController',
'PhabricatorCacophonyDAO' => 'PhabricatorLiskDAO',
'PhabricatorCacophonyMessage' => 'PhabricatorCacophonyDAO',
'PhabricatorCacophonyMessageSaveController' => 'PhabricatorCacophonyController',
'PhabricatorCacophonyTopic' => 'PhabricatorCacophonyDAO',
'PhabricatorCacophonyTopicViewController' => 'PhabricatorCacophonyController',
'PhabricatorConduitAPIController' => 'PhabricatorConduitController',
'PhabricatorConduitConnectionLog' => 'PhabricatorConduitDAO',
'PhabricatorConduitConsoleController' => 'PhabricatorConduitController',

View File

@@ -22,12 +22,16 @@
class AphrontDefaultApplicationConfiguration
extends AphrontApplicationConfiguration {
public function __construct() {
}
public function getApplicationName() {
return 'aphront-default';
}
public function getURIMap() {
return array(
return $this->getResourceURIMapRules() + array(
'/' => array(
'$' => 'PhabricatorDirectoryMainController',
),
@@ -100,11 +104,6 @@ class AphrontDefaultApplicationConfiguration
=> 'DifferentialSubscribeController',
),
'/res/' => array(
'(?P<package>pkg/)?(?P<hash>[a-f0-9]{8})/(?P<path>.+\.(?:css|js))$'
=> 'CelerityResourceController',
),
'/typeahead/' => array(
'common/(?P<type>\w+)/$'
=> 'PhabricatorTypeaheadCommonDatasourceController',
@@ -124,11 +123,8 @@ class AphrontDefaultApplicationConfiguration
'email/$' => 'PhabricatorEmailLoginController',
'etoken/(?P<token>\w+)/$' => 'PhabricatorEmailTokenController',
),
'/logout/$' => 'PhabricatorLogoutController',
'/facebook-auth/' => array(
'$' => 'PhabricatorFacebookAuthController',
'diagnose/$' => 'PhabricatorFacebookAuthDiagnosticsController',
),
'/oauth/' => array(
'(?P<provider>github|facebook)/' => array(
@@ -184,7 +180,17 @@ class AphrontDefaultApplicationConfiguration
'view/(?P<id>\d+)/$' => 'PhabricatorProjectProfileController',
'affiliation/(?P<id>\d+)/$'
=> 'PhabricatorProjectAffiliationEditController',
)
),
);
}
protected function getResourceURIMapRules() {
return array(
'/res/' => array(
'(?P<package>pkg/)?(?P<hash>[a-f0-9]{8})/(?P<path>.+\.(?:css|js))$'
=> 'CelerityResourceController',
),
);
}