Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121728845
ConduitAPI_differential_querydiffs_Method.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
Sun, Jul 13, 10:52
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jul 15, 10:52 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27380978
Attached To
rPH Phabricator
ConduitAPI_differential_querydiffs_Method.php
View Options
<?php
/**
* @group conduit
*/
final
class
ConduitAPI_differential_querydiffs_Method
extends
ConduitAPIMethod
{
public
function
getMethodDescription
()
{
return
pht
(
'Query differential diffs which match certain criteria.'
);
}
public
function
defineParamTypes
()
{
return
array
(
'ids'
=>
'optional list<uint>'
,
'revison_ids'
=>
'optional list<uint>'
,
);
}
public
function
defineErrorTypes
()
{
return
array
();
}
public
function
defineReturnType
()
{
return
'list<dict>'
;
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$ids
=
$request
->
getValue
(
'ids'
,
array
());
$revision_ids
=
$request
->
getValue
(
'revision_ids'
,
array
());
$diffs
=
array
();
$diff_dicts
=
array
();
if
(
$ids
||
$revision_ids
)
{
$diffs
=
id
(
new
DifferentialDiffQuery
())
->
setViewer
(
$request
->
getUser
())
->
withIDs
(
$ids
)
->
withRevisionIDs
(
$revision_ids
)
->
needChangesets
(
true
)
->
needArcanistProjects
(
true
)
->
execute
();
}
return
mpull
(
$diffs
,
'getDiffDict'
,
'getID'
);
}
}
Event Timeline
Log In to Comment