Page MenuHomePhorge

Aphront403Response.php
No OneTemporary

Size
939 B
Referenced Files
None
Subscribers
None

Aphront403Response.php

<?php
/**
* @group aphront
*/
final class Aphront403Response extends AphrontHTMLResponse {
private $forbiddenText;
public function setForbiddenText($text) {
$this->forbiddenText = $text;
return $this;
}
private function getForbiddenText() {
return $this->forbiddenText;
}
public function getHTTPResponseCode() {
return 403;
}
public function buildResponseString() {
$forbidden_text = $this->getForbiddenText();
if (!$forbidden_text) {
$forbidden_text =
'You do not have privileges to access the requested page.';
}
$failure = new AphrontRequestFailureView();
$failure->setHeader('403 Forbidden');
$failure->appendChild(phutil_tag('p', array(), $forbidden_text));
$view = new PhabricatorStandardPageView();
$view->setTitle('403 Forbidden');
$view->setRequest($this->getRequest());
$view->appendChild($failure);
return $view->render();
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, Jun 17, 7:40 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227264
Default Alt Text
Aphront403Response.php (939 B)

Event Timeline