3 final class PHIDInfoConduitAPIMethod
extends PHIDConduitAPIMethod
{
5 public function getAPIMethodName() {
9 public function getMethodStatus() {
10 return self
::METHOD_STATUS_DEPRECATED
;
13 public function getMethodStatusDescription() {
14 return pht("Replaced by 'phid.query'.");
17 public function getMethodDescription() {
18 return pht('Retrieve information about an arbitrary PHID.');
21 protected function defineParamTypes() {
23 'phid' => 'required phid',
27 protected function defineReturnType() {
28 return 'nonempty dict<string, wild>';
31 protected function defineErrorTypes() {
33 'ERR-BAD-PHID' => pht('No such object exists.'),
37 protected function execute(ConduitAPIRequest
$request) {
38 $phid = $request->getValue('phid');
40 $handle = id(new PhabricatorHandleQuery())
41 ->setViewer($request->getUser())
42 ->withPHIDs(array($phid))
45 if (!$handle->isComplete()) {
46 throw new ConduitException('ERR-BAD-PHID');
49 return $this->buildHandleInformationDictionary($handle);