Changeset View
Changeset View
Standalone View
Standalone View
src/applications/base/controller/PhabricatorController.php
| Show First 20 Lines • Show All 245 Lines • ▼ Show 20 Lines | public function buildStandardPageResponse($view, array $data) { | ||||
| $page->appendChild($view); | $page->appendChild($view); | ||||
| $response = new AphrontWebpageResponse(); | $response = new AphrontWebpageResponse(); | ||||
| $response->setContent($page->render()); | $response->setContent($page->render()); | ||||
| return $response; | return $response; | ||||
| } | } | ||||
| public function getApplicationURI($path = '') { | public function getApplicationURI($path = '') { | ||||
| if (!$this->getCurrentApplication()) { | if (!$this->getCurrentApplication()) { | ||||
| throw new Exception("No application!"); | throw new Exception('No application!'); | ||||
| } | } | ||||
| return $this->getCurrentApplication()->getApplicationURI($path); | return $this->getCurrentApplication()->getApplicationURI($path); | ||||
| } | } | ||||
| public function buildApplicationPage($view, array $options) { | public function buildApplicationPage($view, array $options) { | ||||
| $page = $this->buildStandardPageView(); | $page = $this->buildStandardPageView(); | ||||
| $title = PhabricatorEnv::getEnvConfig('phabricator.serious-business') ? | $title = PhabricatorEnv::getEnvConfig('phabricator.serious-business') ? | ||||
| ▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | public function didProcessRequest($response) { | ||||
| $seen = array(); | $seen = array(); | ||||
| while ($response instanceof AphrontProxyResponse) { | while ($response instanceof AphrontProxyResponse) { | ||||
| $hash = spl_object_hash($response); | $hash = spl_object_hash($response); | ||||
| if (isset($seen[$hash])) { | if (isset($seen[$hash])) { | ||||
| $seen[] = get_class($response); | $seen[] = get_class($response); | ||||
| throw new Exception( | throw new Exception( | ||||
| "Cycle while reducing proxy responses: ". | 'Cycle while reducing proxy responses: '. | ||||
| implode(' -> ', $seen)); | implode(' -> ', $seen)); | ||||
| } | } | ||||
| $seen[$hash] = get_class($response); | $seen[$hash] = get_class($response); | ||||
| $response = $response->reduceProxyResponse(); | $response = $response->reduceProxyResponse(); | ||||
| } | } | ||||
| if ($response instanceof AphrontDialogResponse) { | if ($response instanceof AphrontDialogResponse) { | ||||
| ▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines | |||||