[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class UserInfoConduitAPIMethod extends UserConduitAPIMethod { 4 5 public function getAPIMethodName() { 6 return 'user.info'; 7 } 8 9 public function getMethodStatus() { 10 return self::METHOD_STATUS_DEPRECATED; 11 } 12 13 public function getMethodStatusDescription() { 14 return "Replaced by 'user.query'."; 15 } 16 17 public function getMethodDescription() { 18 return 'Retrieve information about a user by 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-USER' => 'No such user exists.', 34 ); 35 } 36 37 protected function execute(ConduitAPIRequest $request) { 38 $user = id(new PhabricatorUser())->loadOneWhere( 39 'phid = %s', 40 $request->getValue('phid')); 41 42 if (!$user) { 43 throw new ConduitException('ERR-BAD-USER'); 44 } 45 46 return $this->buildUserInformationDictionary($user); 47 } 48 49 }
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 |