Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F109849282
DiffusionBlameConduitAPIMethod.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, 15:38
Size
982 B
Mime Type
text/x-php
Expires
Fri, Apr 25, 15:38 (2 d)
Engine
blob
Format
Raw Data
Handle
25698360
Attached To
rPH Phabricator
DiffusionBlameConduitAPIMethod.php
View Options
<?php
final
class
DiffusionBlameConduitAPIMethod
extends
DiffusionQueryConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'diffusion.blame'
;
}
public
function
getMethodDescription
()
{
return
pht
(
'Get blame information for a list of paths.'
);
}
protected
function
defineReturnType
()
{
return
'map<string, wild>'
;
}
protected
function
defineCustomParamTypes
()
{
return
array
(
'paths'
=>
'required list<string>'
,
'commit'
=>
'required string'
,
'timeout'
=>
'optional int'
,
);
}
protected
function
getResult
(
ConduitAPIRequest
$request
)
{
$drequest
=
$this
->
getDiffusionRequest
();
$paths
=
$request
->
getValue
(
'paths'
);
$blame_query
=
DiffusionBlameQuery
::
newFromDiffusionRequest
(
$drequest
)
->
setPaths
(
$paths
);
$timeout
=
$request
->
getValue
(
'timeout'
);
if
(
$timeout
)
{
$blame_query
->
setTimeout
(
$timeout
);
}
$blame
=
$blame_query
->
execute
();
return
$blame
;
}
}
Event Timeline
Log In to Comment