Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93115934
DiffusionResolveRefsConduitAPIMethod.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 26, 08:04
Size
954 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 08:04 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22578218
Attached To
rPH Phabricator
DiffusionResolveRefsConduitAPIMethod.php
View Options
<?php
final
class
DiffusionResolveRefsConduitAPIMethod
extends
DiffusionQueryConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'diffusion.resolverefs'
;
}
public
function
getMethodDescription
()
{
return
pht
(
'Resolve references into stable, canonical identifiers.'
);
}
protected
function
defineReturnType
()
{
return
'dict<string, list<dict<string, wild>>>'
;
}
protected
function
defineCustomParamTypes
()
{
return
array
(
'refs'
=>
'required list<string>'
,
'types'
=>
'optional list<string>'
,
);
}
protected
function
getResult
(
ConduitAPIRequest
$request
)
{
$refs
=
$request
->
getValue
(
'refs'
);
$types
=
$request
->
getValue
(
'types'
);
$query
=
id
(
new
DiffusionLowLevelResolveRefsQuery
())
->
setRepository
(
$this
->
getDiffusionRequest
()->
getRepository
())
->
withRefs
(
$refs
);
if
(
$types
)
{
$query
->
withTypes
(
$types
);
}
return
$query
->
execute
();
}
}
Event Timeline
Log In to Comment