[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PHIDInfoConduitAPIMethod extends PHIDConduitAPIMethod { 4 5 public function getAPIMethodName() { 6 return 'phid.info'; 7 } 8 9 public function getMethodStatus() { 10 return self::METHOD_STATUS_DEPRECATED; 11 } 12 13 public function getMethodStatusDescription() { 14 return "Replaced by 'phid.query'."; 15 } 16 17 public function getMethodDescription() { 18 return 'Retrieve information about an arbitrary PHID.'; 19 } 20 21 public function defineParamTypes() { 22 return array( 23 'phid' => 'required phid', 24 ); 25 } 26 27 public function defineReturnType() { 28 return 'nonempty dict<string, wild>'; 29 } 30 31 public function defineErrorTypes() { 32 return array( 33 'ERR-BAD-PHID' => 'No such object exists.', 34 ); 35 } 36 37 protected function execute(ConduitAPIRequest $request) { 38 $phid = $request->getValue('phid'); 39 40 $handle = id(new PhabricatorHandleQuery()) 41 ->setViewer($request->getUser()) 42 ->withPHIDs(array($phid)) 43 ->executeOne(); 44 45 if (!$handle->isComplete()) { 46 throw new ConduitException('ERR-BAD-PHID'); 47 } 48 49 return $this->buildHandleInformationDictionary($handle); 50 } 51 52 }
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 |