Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F109802569
ConduitAPI_differential_getalldiffs_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
Wed, Apr 23, 11:15
Size
966 B
Mime Type
text/x-php
Expires
Fri, Apr 25, 11:15 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25759135
Attached To
rPH Phabricator
ConduitAPI_differential_getalldiffs_Method.php
View Options
<?php
/**
* @group conduit
*/
final
class
ConduitAPI_differential_getalldiffs_Method
extends
ConduitAPIMethod
{
public
function
getMethodDescription
()
{
return
"Load all diffs for given revisions from Differential."
;
}
public
function
defineParamTypes
()
{
return
array
(
'revision_ids'
=>
'required list<int>'
,
);
}
public
function
defineReturnType
()
{
return
'dict'
;
}
public
function
defineErrorTypes
()
{
return
array
();
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$results
=
array
();
$revision_ids
=
$request
->
getValue
(
'revision_ids'
);
if
(!
$revision_ids
)
{
return
$results
;
}
$diffs
=
id
(
new
DifferentialDiff
())->
loadAllWhere
(
'revisionID IN (%Ld)'
,
$revision_ids
);
foreach
(
$diffs
as
$diff
)
{
$results
[]
=
array
(
'revision_id'
=>
$diff
->
getRevisionID
(),
'diff_id'
=>
$diff
->
getID
(),
);
}
return
$results
;
}
}
Event Timeline
Log In to Comment