Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/AphrontRequest.php
Show First 20 Lines • Show All 588 Lines • ▼ Show 20 Lines | /* -( Accessing Request Data )--------------------------------------------- */ | ||||
public function getViewer() { | public function getViewer() { | ||||
return $this->user; | return $this->user; | ||||
} | } | ||||
public function getRequestURI() { | public function getRequestURI() { | ||||
$request_uri = idx($_SERVER, 'REQUEST_URI', '/'); | $request_uri = idx($_SERVER, 'REQUEST_URI', '/'); | ||||
$uri = new PhutilURI($request_uri); | $uri = new PhutilURI($request_uri); | ||||
$uri->setQueryParam('__path__', null); | $uri->removeQueryParam('__path__'); | ||||
$path = phutil_escape_uri($this->getPath()); | $path = phutil_escape_uri($this->getPath()); | ||||
$uri->setPath($path); | $uri->setPath($path); | ||||
return $uri; | return $uri; | ||||
} | } | ||||
public function getAbsoluteRequestURI() { | public function getAbsoluteRequestURI() { | ||||
▲ Show 20 Lines • Show All 308 Lines • Show Last 20 Lines |