Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / diffusion / response / DiffusionGitLFSResponse.php
blob513dc577e9f19c8cd9162416f63abc3198110da1
1 <?php
3 final class DiffusionGitLFSResponse extends AphrontResponse {
5 private $content;
7 public static function newErrorResponse($code, $message) {
9 // We can optionally include "request_id" and "documentation_url" in
10 // this response.
12 return id(new self())
13 ->setHTTPResponseCode($code)
14 ->setContent(
15 array(
16 'message' => $message,
17 ));
20 public function setContent(array $content) {
21 $this->content = phutil_json_encode($content);
22 return $this;
25 public function buildResponseString() {
26 return $this->content;
29 public function getHeaders() {
30 $headers = array(
31 array('Content-Type', 'application/vnd.git-lfs+json'),
34 return array_merge(parent::getHeaders(), $headers);