Path: blob/master/src/aphront/response/Aphront404Response.php
12241 views
<?php12final class Aphront404Response extends AphrontHTMLResponse {34public function getHTTPResponseCode() {5return 404;6}78public function buildResponseString() {9$request = $this->getRequest();10$viewer = $request->getViewer();1112// See T13636. Note that this response may be served from a Site other than13// the primary PlatformSite. For now, always link to the PlatformSite.1415// (This may not be the best possible place to send users who are currently16// on "real" sites, like the BlogSite.)17$return_uri = PhabricatorEnv::getURI('/');1819$dialog = id(new AphrontDialogView())20->setViewer($viewer)21->setTitle(pht('404 Not Found'))22->addCancelButton($return_uri, pht('Return to Charted Waters'))23->appendParagraph(24pht(25'You arrive at your destination, but there is nothing here.'))26->appendParagraph(27pht(28'Perhaps the real treasure was the friends you made '.29'along the way.'));3031$view = id(new PhabricatorStandardPageView())32->setTitle(pht('404 Not Found'))33->setRequest($request)34->setDeviceReady(true)35->appendChild($dialog);3637return $view->render();38}3940}414243