[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/people/conduit/ -> UserWhoAmIConduitAPIMethod.php (source)

   1  <?php
   2  
   3  final class UserWhoAmIConduitAPIMethod extends UserConduitAPIMethod {
   4  
   5    public function getAPIMethodName() {
   6      return 'user.whoami';
   7    }
   8  
   9    public function getMethodDescription() {
  10      return 'Retrieve information about the logged-in user.';
  11    }
  12  
  13    public function defineParamTypes() {
  14      return array();
  15    }
  16  
  17    public function defineReturnType() {
  18      return 'nonempty dict<string, wild>';
  19    }
  20  
  21    public function defineErrorTypes() {
  22      return array();
  23    }
  24  
  25    public function getRequiredScope() {
  26      return PhabricatorOAuthServerScope::SCOPE_WHOAMI;
  27    }
  28  
  29    protected function execute(ConduitAPIRequest $request) {
  30      return $this->buildUserInformationDictionary($request->getUser());
  31    }
  32  
  33  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1