Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/AphrontRequest.php
| Show All 20 Lines | final class AphrontRequest extends Phobject { | ||||
| const TYPE_HISEC = '__hisec__'; | const TYPE_HISEC = '__hisec__'; | ||||
| const TYPE_QUICKSAND = '__quicksand__'; | const TYPE_QUICKSAND = '__quicksand__'; | ||||
| private $host; | private $host; | ||||
| private $path; | private $path; | ||||
| private $requestData; | private $requestData; | ||||
| private $user; | private $user; | ||||
| private $applicationConfiguration; | private $applicationConfiguration; | ||||
| private $site; | |||||
| private $controller; | |||||
| private $uriData; | private $uriData; | ||||
| private $cookiePrefix; | private $cookiePrefix; | ||||
| public function __construct($host, $path) { | public function __construct($host, $path) { | ||||
| $this->host = $host; | $this->host = $host; | ||||
| $this->path = $path; | $this->path = $path; | ||||
| } | } | ||||
| Show All 35 Lines | public function getHost() { | ||||
| // parser to extract the real domain correctly. See here for coverage of | // parser to extract the real domain correctly. See here for coverage of | ||||
| // a similar issue in Django: | // a similar issue in Django: | ||||
| // | // | ||||
| // https://www.djangoproject.com/weblog/2012/oct/17/security/ | // https://www.djangoproject.com/weblog/2012/oct/17/security/ | ||||
| $uri = new PhutilURI('http://'.$this->host); | $uri = new PhutilURI('http://'.$this->host); | ||||
| return $uri->getDomain(); | return $uri->getDomain(); | ||||
| } | } | ||||
| public function setSite(AphrontSite $site) { | |||||
| $this->site = $site; | |||||
| return $this; | |||||
| } | |||||
| public function getSite() { | |||||
| return $this->site; | |||||
| } | |||||
| public function setController(AphrontController $controller) { | |||||
| $this->controller = $controller; | |||||
| return $this; | |||||
| } | |||||
| public function getController() { | |||||
| return $this->controller; | |||||
| } | |||||
| /* -( Accessing Request Data )--------------------------------------------- */ | /* -( Accessing Request Data )--------------------------------------------- */ | ||||
| /** | /** | ||||
| * @task data | * @task data | ||||
| */ | */ | ||||
| public function setRequestData(array $request_data) { | public function setRequestData(array $request_data) { | ||||
| ▲ Show 20 Lines • Show All 680 Lines • Show Last 20 Lines | |||||