Page MenuHomePhabricator

final class AphrontReloadResponse
Phabricator Technical Documentation (Aphront)

When actions happen over a JX.Workflow, we may want to reload the page if the action is javascript-driven but redirect if it isn't. This preserves query parameters in the javascript case. A reload response behaves like a redirect response but causes a page reload when received via workflow.

Methods

public function setRequest($request)
Inherited

This method is not documented.
Parameters
$request
Return
wild

public function getRequest()
Inherited

This method is not documented.
Return
wild

final public function addContentSecurityPolicyURI($kind, $uri)
Inherited

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

final public function setDisableContentSecurityPolicy($disable)
Inherited

This method is not documented.
Parameters
$disable
Return
wild

final public function addHeader($key, $value)
Inherited

This method is not documented.
Parameters
$key
$value
Return
wild

public function getContentIterator()
Inherited

This method is not documented.
Return
wild

public function buildResponseString()
Inherited

This method is not documented.
Return
wild

public function getHeaders()
Inherited

This method is not documented.
Return
wild

private function newContentSecurityPolicyHeader()
Inherited

This method is not documented.
Return
wild

private function newContentSecurityPolicy($type, $defaults)
Inherited

This method is not documented.
Parameters
$type
$defaults
Return
wild

private function newContentSecurityPolicySource($uri)
Inherited

This method is not documented.
Parameters
$uri
Return
wild

public function setCacheDurationInSeconds($duration)
Inherited

This method is not documented.
Parameters
$duration
Return
wild

public function setCanCDN($can_cdn)
Inherited

This method is not documented.
Parameters
$can_cdn
Return
wild

public function setLastModified($epoch_timestamp)
Inherited

This method is not documented.
Parameters
$epoch_timestamp
Return
wild

public function setHTTPResponseCode($code)
Inherited

This method is not documented.
Parameters
$code
Return
wild

public function getHTTPResponseCode()
Inherited

This method is not documented.
Return
wild

public function getHTTPResponseMessage()
Inherited

This method is not documented.
Return
wild

public function setFrameable($frameable)
Inherited

This method is not documented.
Parameters
$frameable
Return
wild

public static function processValueForJSONEncoding(&$value, $key)
Inherited

This method is not documented.
Parameters
&$value
$key
Return
wild

public static function encodeJSONForHTTPResponse($object)
Inherited

This method is not documented.
Parameters
array$object
Return
wild

protected function addJSONShield($json_response)
Inherited

This method is not documented.
Parameters
$json_response
Return
wild

public function getCacheHeaders()
Inherited

This method is not documented.
Return
wild

private function formatEpochTimestampForHTTPHeader($epoch_timestamp)
Inherited

This method is not documented.
Parameters
$epoch_timestamp
Return
wild

protected function shouldCompressResponse()
Inherited

This method is not documented.
Return
wild

public function willBeginWrite()
Inherited

This method is not documented.
Return
wild

public function didCompleteWrite($aborted)
Inherited

This method is not documented.
Parameters
$aborted
Return
wild

public function setIsExternal($external)
Inherited

This method is not documented.
Parameters
$external
Return
wild

public function __construct()
Inherited

This method is not documented.
Return
this//Implicit.//

public function setURI($uri)
Inherited

This method is not documented.
Parameters
$uri
Return
wild

public function getURI()

This method is not documented.
Return
wild

public function shouldStopForDebugging()
Inherited

This method is not documented.
Return
wild

public function setCloseDialogBeforeRedirect($close)
Inherited

This method is not documented.
Parameters
$close
Return
wild

public function getCloseDialogBeforeRedirect()
Inherited

This method is not documented.
Return
wild

public static function getURIForRedirect($uri, $is_external)
Inherited

AphrontRedirectResponse

Format a URI for use in a "Location:" header.

Verifies that a URI redirects to the expected type of resource (local or remote) and formats it for use in a "Location:" header.

The HTTP spec says "Location:" headers must use absolute URIs. Although browsers work with relative URIs, we return absolute URIs to avoid ambiguity. For example, Chrome interprets "Location: /\evil.com" to mean "perform a protocol-relative redirect to evil.com".

Parameters
string$uriURI to redirect to.
bool$is_externalTrue if this URI identifies a remote resource.
Return
stringURI for use in a "Location:" header.