Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F568023
DifferentialQueryDiffsConduitAPIMethod.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DifferentialQueryDiffsConduitAPIMethod.php
View Options
<?php
final
class
DifferentialQueryDiffsConduitAPIMethod
extends
DifferentialConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'differential.querydiffs'
;
}
public
function
getMethodDescription
()
{
return
pht
(
'Query differential diffs which match certain criteria.'
);
}
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_FROZEN
;
}
public
function
getMethodStatusDescription
()
{
return
pht
(
'This method is frozen and will eventually be deprecated. New code '
.
'should use "differential.diff.search" instead.'
);
}
protected
function
defineParamTypes
()
{
return
array
(
'ids'
=>
'optional list<uint>'
,
'revisionIDs'
=>
'optional list<uint>'
,
);
}
protected
function
defineReturnType
()
{
return
'list<dict>'
;
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$ids
=
$request
->
getValue
(
'ids'
,
array
());
$revision_ids
=
$request
->
getValue
(
'revisionIDs'
,
array
());
if
(!
$ids
&&
!
$revision_ids
)
{
// This method just returns nothing if you pass no constraints because
// pagination hadn't been invented yet in 2008 when this method was
// written.
return
array
();
}
$query
=
id
(
new
DifferentialDiffQuery
())
->
setViewer
(
$request
->
getUser
())
->
needChangesets
(
true
);
if
(
$ids
)
{
$query
->
withIDs
(
$ids
);
}
if
(
$revision_ids
)
{
$query
->
withRevisionIDs
(
$revision_ids
);
}
$diffs
=
$query
->
execute
();
return
mpull
(
$diffs
,
'getDiffDict'
,
'getID'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 1:11 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
105350
Default Alt Text
DifferentialQueryDiffsConduitAPIMethod.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment