1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 11:12:42 +01:00
phorge-phorge/src/applications/diffusion/conduit/DiffusionResolveRefsConduitAPIMethod.php

34 lines
802 B
PHP
Raw Normal View History

<?php
final class DiffusionResolveRefsConduitAPIMethod
extends DiffusionQueryConduitAPIMethod {
public function getAPIMethodName() {
return 'differential.resolverefsquery';
}
public function getMethodDescription() {
return pht('Resolve references into stable, canonical identifiers.');
}
public function defineReturnType() {
return 'dict<string, list<dict<string, wild>>>';
}
protected function defineCustomParamTypes() {
return array(
'refs' => 'required list<string>',
);
}
protected function getResult(ConduitAPIRequest $request) {
$refs = $request->getValue('refs');
return id(new DiffusionLowLevelResolveRefsQuery())
->setRepository($this->getDiffusionRequest()->getRepository())
->withRefs($refs)
->execute();
}
}