Path: blob/master/src/applications/diffusion/conduit/DiffusionResolveRefsConduitAPIMethod.php
12242 views
<?php12final class DiffusionResolveRefsConduitAPIMethod3extends DiffusionQueryConduitAPIMethod {45public function getAPIMethodName() {6return 'diffusion.resolverefs';7}89public function getMethodDescription() {10return pht('Resolve references into stable, canonical identifiers.');11}1213protected function defineReturnType() {14return 'dict<string, list<dict<string, wild>>>';15}1617protected function defineCustomParamTypes() {18return array(19'refs' => 'required list<string>',20'types' => 'optional list<string>',21);22}2324protected function getResult(ConduitAPIRequest $request) {25$refs = $request->getValue('refs');26$types = $request->getValue('types');2728$query = id(new DiffusionLowLevelResolveRefsQuery())29->setRepository($this->getDiffusionRequest()->getRepository())30->withRefs($refs);3132if ($types) {33$query->withTypes($types);34}3536return $query->execute();37}3839}404142