[ Index ] |
PHP Cross Reference of Phabricator |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 250 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
setRequest(AphrontRequest $request) X-Ref |
getRequest() X-Ref |
No description |
getConsole() X-Ref |
No description |
setConsole($console) X-Ref |
No description |
setHost($host) X-Ref |
No description |
getHost() X-Ref |
No description |
setPath($path) X-Ref |
No description |
getPath() X-Ref |
No description |
willBuildRequest() X-Ref |
No description |
buildController() X-Ref |
Using builtin and application routes, build the appropriate @{class:AphrontController} class for the request. To route a request, we first test if the HTTP_HOST is configured as a valid Phabricator URI. If it isn't, we do a special check to see if it's a custom domain for a blog in the Phame application and if that fails we error. Otherwise, we test against all application routes from installed @{class:PhabricatorApplication}s. If we match a route, we construct the controller it points at, build it, and return it. If we fail to match a route, but the current path is missing a trailing "/", we try routing the same path with a trailing "/" and do a redirect if that has a valid route. The idea is to canoncalize URIs for consistency, but avoid breaking noncanonical URIs that we can easily salvage. NOTE: We only redirect on GET. On POST, we'd drop parameters and most likely mutate the request implicitly, and a bad POST usually indicates a programming error rather than a sloppy typist. If the failing path already has a trailing "/", or we can't route the version with a "/", we call @{method:build404Controller}, which build a fallback @{class:AphrontController}. return: pair<AphrontController,dict> Controller and dictionary of request |
buildControllerForPath($path) X-Ref |
Map a specific path to the corresponding controller. For a description of routing, see @{method:buildController}. return: pair<AphrontController,dict> Controller and dictionary of request |
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |