Differential D12608 Diff 30422 src/applications/diffusion/conduit/DiffusionFindSymbolsConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/conduit/DiffusionFindSymbolsConduitAPIMethod.php
<?php | <?php | ||||
final class DiffusionFindSymbolsConduitAPIMethod | final class DiffusionFindSymbolsConduitAPIMethod | ||||
extends DiffusionConduitAPIMethod { | extends DiffusionConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'diffusion.findsymbols'; | return 'diffusion.findsymbols'; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Retrieve Diffusion symbol information.'; | return pht('Retrieve Diffusion symbol information.'); | ||||
} | } | ||||
protected function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'name' => 'optional string', | 'name' => 'optional string', | ||||
'namePrefix' => 'optional string', | 'namePrefix' => 'optional string', | ||||
'context' => 'optional string', | 'context' => 'optional string', | ||||
'language' => 'optional string', | 'language' => 'optional string', | ||||
Show All 26 Lines | protected function execute(ConduitAPIRequest $request) { | ||||
if ($language !== null) { | if ($language !== null) { | ||||
$query->setLanguage($language); | $query->setLanguage($language); | ||||
} | } | ||||
if ($type !== null) { | if ($type !== null) { | ||||
$query->setType($type); | $query->setType($type); | ||||
} | } | ||||
$query->needPaths(true); | $query->needPaths(true); | ||||
$query->needArcanistProjects(true); | |||||
$query->needRepositories(true); | $query->needRepositories(true); | ||||
$results = $query->execute(); | $results = $query->execute(); | ||||
$response = array(); | $response = array(); | ||||
foreach ($results as $result) { | foreach ($results as $result) { | ||||
$uri = $result->getURI(); | $uri = $result->getURI(); | ||||
Show All 19 Lines |