Page MenuHomeIsabelle/Phabricator
Diviner Phabricator Tech Docs AphrontApplicationConfiguration

final class AphrontApplicationConfiguration
Phabricator Technical Documentation (Aphront)

This class is not documented.

Tasks

URI Routing

  • private function buildController() — Build a controller to respond to the request.
  • private function routePath($maps, $path) — Map a specific path to the corresponding controller. For a description of routing, see @{method:buildController}.

Response Handling

  • private function isValidResponseObject($response) — Tests if a response is of a valid type.
  • private function validateControllerResponse($controller, $response) — Verifies that the return value from an @{class:AphrontController} is of an allowed type.
  • private function validateProducerResponse($producer, $response) — Verifies that the return value from an @{class:AphrontResponseProducerInterface} is of an allowed type.
  • private function validateErrorHandlerResponse($handler, $response) — Verifies that the return value from an @{class:AphrontRequestExceptionHandler} is of an allowed type.
  • private function produceResponse($request, $response) — Resolves a response object into an @{class:AphrontResponse}.

Exception Handling

  • private function handleThrowable($throwable) — Convert an exception which has escaped the controller into a response.

Other Methods

Methods

public function buildRequest()

This method is not documented.
Return
wild

public function build404Controller()

This method is not documented.
Return
wild

public function buildRedirectController($uri, $external)

This method is not documented.
Parameters
$uri
$external
Return
wild

public function setRequest($request)

This method is not documented.
Parameters
AphrontRequest$request
Return
wild

public function getRequest()

This method is not documented.
Return
wild

public function getConsole()

This method is not documented.
Return
wild

public function setConsole($console)

This method is not documented.
Parameters
$console
Return
wild

public function setHost($host)

This method is not documented.
Parameters
$host
Return
wild

public function getHost()

This method is not documented.
Return
wild

public function setPath($path)

This method is not documented.
Parameters
$path
Return
wild

public function getPath()

This method is not documented.
Return
wild

public static function runHTTPRequest($sink)

This method is not documented.
Parameters
AphrontHTTPSink$sink
Return
wild

public function processRequest($request, $access_log, $sink, $multimeter)

This method is not documented.
Parameters
AphrontRequest$request
PhutilDeferredLog$access_log
AphrontHTTPSink$sink
MultimeterControl$multimeter
Return
wild

private static function writeResponse($sink, $response)

This method is not documented.
Parameters
AphrontHTTPSink$sink
AphrontResponse$response
Return
wild

private function buildController()

Build a controller to respond to the request.

Return
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().

Parameters
list<AphrontRoutingMap>$mapsList of routing maps.
string$pathPath to route.
Return
pair<AphrontController,dict>Controller and dictionary of request parameters.

private function buildSiteForRequest($request)

This method is not documented.
Parameters
AphrontRequest$request
Return
wild

private function isValidResponseObject($response)

Tests if a response is of a valid type.

Parameters
wild$responseSupposedly valid response.
Return
boolTrue 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.

Parameters
AphrontController$controllerController which returned the response.
wild$responseSupposedly valid response.
Return
void

private function validateProducerResponse($producer, $response)

Verifies that the return value from an AphrontResponseProducerInterface is of an allowed type.

Parameters
AphrontResponseProducerInterface$producerObject which produced this response.
wild$responseSupposedly valid response.
Return
void

private function validateErrorHandlerResponse($handler, $response)

Verifies that the return value from an AphrontRequestExceptionHandler is of an allowed type.

Parameters
AphrontRequestExceptionHandler$handlerObject which produced this response.
wild$responseSupposedly valid response.
Return
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.

Parameters
AphrontRequest$requestRequest being handled.
AphrontResponse|AphrontResponseProducerInterface$responseResponse, or response producer.
Return
AphrontResponseResponse 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.

Parameters
Throwable$throwableException which needs to be handled.
Return
wildResponse or response producer, or null if no available handler can produce a response.

private static function newSelfCheckResponse()

This method is not documented.
Return
wild

private static function readHTTPPOSTData()

This method is not documented.
Return
wild