Path: blob/master/src/aphront/response/AphrontWebpageResponse.php
12241 views
<?php12final class AphrontWebpageResponse extends AphrontHTMLResponse {34private $content;5private $unexpectedOutput;67public function setContent($content) {8$this->content = $content;9return $this;10}1112public function setUnexpectedOutput($unexpected_output) {13$this->unexpectedOutput = $unexpected_output;14return $this;15}1617public function getUnexpectedOutput() {18return $this->unexpectedOutput;19}2021public function buildResponseString() {22$unexpected_output = $this->getUnexpectedOutput();23if ($unexpected_output !== null && strlen($unexpected_output)) {24$style = array(25'background: linear-gradient(180deg, #eeddff, #ddbbff);',26'white-space: pre-wrap;',27'z-index: 200000;',28'position: relative;',29'padding: 16px;',30'font-family: monospace;',31'text-shadow: 1px 1px 1px white;',32);3334$unexpected_header = phutil_tag(35'div',36array(37'style' => implode(' ', $style),38),39$unexpected_output);40} else {41$unexpected_header = '';42}4344return hsprintf('%s%s', $unexpected_header, $this->content);45}4647}484950