2012-03-13 05:39:05 +01:00
|
|
|
<?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();
|
|
|
|
}
|
|
|
|
|
2012-12-12 02:27:25 +01:00
|
|
|
public function reduceProxyResponse() {
|
2012-03-13 05:39:05 +01:00
|
|
|
$content = array(
|
|
|
|
'changeset' => $this->renderedChangeset,
|
|
|
|
);
|
|
|
|
|
|
|
|
if ($this->coverage) {
|
|
|
|
$content['coverage'] = $this->coverage;
|
|
|
|
}
|
|
|
|
|
2012-12-12 02:27:25 +01:00
|
|
|
return $this->getProxy()->setContent($content);
|
2012-03-13 05:39:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|