[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class DifferentialQueryDiffsConduitAPIMethod 4 extends DifferentialConduitAPIMethod { 5 6 public function getAPIMethodName() { 7 return 'differential.querydiffs'; 8 } 9 10 public function getMethodDescription() { 11 return pht('Query differential diffs which match certain criteria.'); 12 } 13 14 public function defineParamTypes() { 15 return array( 16 'ids' => 'optional list<uint>', 17 'revisionIDs' => 'optional list<uint>', 18 ); 19 } 20 21 public function defineErrorTypes() { 22 return array(); 23 } 24 25 public function defineReturnType() { 26 return 'list<dict>'; 27 } 28 29 protected function execute(ConduitAPIRequest $request) { 30 $ids = $request->getValue('ids', array()); 31 $revision_ids = $request->getValue('revisionIDs', array()); 32 33 $diffs = array(); 34 if ($ids || $revision_ids) { 35 $diffs = id(new DifferentialDiffQuery()) 36 ->setViewer($request->getUser()) 37 ->withIDs($ids) 38 ->withRevisionIDs($revision_ids) 39 ->needChangesets(true) 40 ->needArcanistProjects(true) 41 ->execute(); 42 } 43 44 return mpull($diffs, 'getDiffDict', 'getID'); 45 } 46 47 }
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 |