[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class DiffusionRawDiffQueryConduitAPIMethod 4 extends DiffusionQueryConduitAPIMethod { 5 6 public function getAPIMethodName() { 7 return 'diffusion.rawdiffquery'; 8 } 9 10 public function getMethodDescription() { 11 return 12 'Get raw diff information from a repository for a specific commit at an '. 13 '(optional) path.'; 14 } 15 16 public function defineReturnType() { 17 return 'string'; 18 } 19 20 protected function defineCustomParamTypes() { 21 return array( 22 'commit' => 'required string', 23 'path' => 'optional string', 24 'timeout' => 'optional int', 25 'byteLimit' => 'optional int', 26 'linesOfContext' => 'optional int', 27 'againstCommit' => 'optional string', 28 ); 29 } 30 31 protected function getResult(ConduitAPIRequest $request) { 32 $drequest = $this->getDiffusionRequest(); 33 34 $raw_query = DiffusionRawDiffQuery::newFromDiffusionRequest($drequest); 35 36 $timeout = $request->getValue('timeout'); 37 if ($timeout !== null) { 38 $raw_query->setTimeout($timeout); 39 } 40 41 $lines_of_context = $request->getValue('linesOfContext'); 42 if ($lines_of_context !== null) { 43 $raw_query->setLinesOfContext($lines_of_context); 44 } 45 46 $against_commit = $request->getValue('againstCommit'); 47 if ($against_commit !== null) { 48 $raw_query->setAgainstCommit($against_commit); 49 } 50 51 $byte_limit = $request->getValue('byteLimit'); 52 if ($byte_limit !== null) { 53 $raw_query->setByteLimit($byte_limit); 54 } 55 56 return $raw_query->loadRawDiff(); 57 } 58 59 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |