mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 16:00:59 +01:00
35 lines
728 B
PHP
35 lines
728 B
PHP
|
<?php
|
||
|
|
||
|
final class PhabricatorChangesetResponse extends AphrontProxyResponse {
|
||
|
|
||
|
private $renderedChangeset;
|
||
|
private $coverage;
|
||
|
|
||
|
public function setRenderedChangeset($rendered_changeset) {
|
||
|
$this->renderedChangeset = $rendered_changeset;
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
public function setCoverage($coverage) {
|
||
|
$this->coverage = $coverage;
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
protected function buildProxy() {
|
||
|
return new AphrontAjaxResponse();
|
||
|
}
|
||
|
|
||
|
public function buildResponseString() {
|
||
|
$content = array(
|
||
|
'changeset' => $this->renderedChangeset,
|
||
|
);
|
||
|
|
||
|
if ($this->coverage) {
|
||
|
$content['coverage'] = $this->coverage;
|
||
|
}
|
||
|
|
||
|
return $this->getProxy()->setContent($content)->buildResponseString();
|
||
|
}
|
||
|
|
||
|
}
|