public function buildRequest()
wild |
public function build404Controller()
wild |
public function buildRedirectController($uri, $external)
$uri | ||
$external |
wild |
public function setRequest($request)
AphrontRequest | $request |
wild |
public function getRequest()
wild |
public function getConsole()
wild |
public function setConsole($console)
$console |
wild |
public function setHost($host)
$host |
wild |
public function getHost()
wild |
public function setPath($path)
$path |
wild |
public function getPath()
wild |
public static function runHTTPRequest($sink)
AphrontHTTPSink | $sink |
wild |
public function processRequest($request, $access_log, $sink, $multimeter)
AphrontRequest | $request | |
PhutilDeferredLog | $access_log | |
AphrontHTTPSink | $sink | |
MultimeterControl | $multimeter |
wild |
private static function writeResponse($sink, $response)
AphrontHTTPSink | $sink | |
AphrontResponse | $response |
wild |
private function buildController()
Build a controller to respond to the request.
pair<AphrontController,dict> | Controller and dictionary of request parameters. |
private function routePath($maps, $path)
Map a specific path to the corresponding controller. For a description of routing, see buildController().
list<AphrontRoutingMap> | $maps | List of routing maps. |
string | $path | Path to route. |
pair<AphrontController,dict> | Controller and dictionary of request parameters. |
private function buildSiteForRequest($request)
AphrontRequest | $request |
wild |
private function isValidResponseObject($response)
Tests if a response is of a valid type.
wild | $response | Supposedly valid response. |
bool | True if the object is of a valid type. |
private function validateControllerResponse($controller, $response)
Verifies that the return value from an AphrontController is of an allowed type.
AphrontController | $controller | Controller which returned the response. |
wild | $response | Supposedly valid response. |
void |
private function validateProducerResponse($producer, $response)
Verifies that the return value from an AphrontResponseProducerInterface is of an allowed type.
AphrontResponseProducerInterface | $producer | Object which produced this response. |
wild | $response | Supposedly valid response. |
void |
private function validateErrorHandlerResponse($handler, $response)
Verifies that the return value from an AphrontRequestExceptionHandler is of an allowed type.
AphrontRequestExceptionHandler | $handler | Object which produced this response. |
wild | $response | Supposedly valid response. |
void |
private function produceResponse($request, $response)
Resolves a response object into an AphrontResponse.
Controllers are permitted to return actual responses of class AphrontResponse, or other objects which implement AphrontResponseProducerInterface and can produce a response.
If a controller returns a response producer, invoke it now and produce the real response.
AphrontRequest | $request | Request being handled. |
AphrontResponse|AphrontResponseProducerInterface | $response | Response, or response producer. |
AphrontResponse | Response after any required production. |
private function handleThrowable($throwable)
Convert an exception which has escaped the controller into a response.
This method delegates exception handling to available subclasses of AphrontRequestExceptionHandler.
Throwable | $throwable | Exception which needs to be handled. |
wild | Response or response producer, or null if no available handler can produce a response. |
private static function newSelfCheckResponse()
wild |
private static function readHTTPPOSTData()
wild |