1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-04 04:32:43 +01:00
phorge-phorge/src/applications/diffusion/conduit/DiffusionCommitParentsQueryConduitAPIMethod.php

35 lines
795 B
PHP
Raw Normal View History

<?php
final class DiffusionCommitParentsQueryConduitAPIMethod
extends DiffusionQueryConduitAPIMethod {
public function getAPIMethodName() {
return 'diffusion.commitparentsquery';
}
public function getMethodDescription() {
return pht(
"Get the commit identifiers for a commit's parent or parents.");
}
protected function defineReturnType() {
return 'list<string>';
}
protected function defineCustomParamTypes() {
return array(
'commit' => 'required string',
);
}
protected function getResult(ConduitAPIRequest $request) {
$repository = $this->getRepository($request);
return id(new DiffusionLowLevelParentsQuery())
->setRepository($repository)
->withIdentifier($request->getValue('commit'))
->execute();
}
}