1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-26 23:40:57 +01:00
phorge-phorge/src/infrastructure/diff/PhabricatorChangesetResponse.php

35 lines
705 B
PHP
Raw Normal View History

<?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 reduceProxyResponse() {
$content = array(
'changeset' => $this->renderedChangeset,
);
if ($this->coverage) {
$content['coverage'] = $this->coverage;
}
return $this->getProxy()->setContent($content);
}
}