@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
at recaptime-dev/main 32 lines 797 B view raw
1<?php 2 3final class DiffusionFileContentQueryConduitAPIMethod 4 extends DiffusionQueryConduitAPIMethod { 5 6 public function getAPIMethodName() { 7 return 'diffusion.filecontentquery'; 8 } 9 10 public function getMethodDescription() { 11 return pht('Retrieve file content from a repository.'); 12 } 13 14 protected function defineReturnType() { 15 return 'array'; 16 } 17 18 protected function defineCustomParamTypes() { 19 return array( 20 'path' => 'required string', 21 'commit' => 'required string', 22 ) + DiffusionFileFutureQuery::getConduitParameters(); 23 } 24 25 protected function getResult(ConduitAPIRequest $request) { 26 $drequest = $this->getDiffusionRequest(); 27 28 return DiffusionFileContentQuery::newFromDiffusionRequest($drequest) 29 ->respondToConduitRequest($request); 30 } 31 32}