Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
777 B · 37 lines
PHP
1234567891011121314151617181920212223242526272829303132333435363738<?php
final class DiffusionGitLFSResponse extends AphrontResponse {
private $content;
public static function newErrorResponse($code, $message) {
// We can optionally include "request_id" and "documentation_url" in // this response.
return id(new self()) ->setHTTPResponseCode($code) ->setContent( array( 'message' => $message, )); }
public function setContent(array $content) { $this->content = phutil_json_encode($content); return $this; }
public function buildResponseString() { return $this->content; }
public function getHeaders() { $headers = array( array('Content-Type', 'application/vnd.git-lfs+json'), );
return array_merge(parent::getHeaders(), $headers); }
}