Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101359553
ConduitAPI_phid_query_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
Sat, Feb 8, 18:30
Size
920 B
Mime Type
text/x-php
Expires
Mon, Feb 10, 18:30 (2 d)
Engine
blob
Format
Raw Data
Handle
24144084
Attached To
rPH Phabricator
ConduitAPI_phid_query_Method.php
View Options
<?php
/**
* @group conduit
*/
final
class
ConduitAPI_phid_query_Method
extends
ConduitAPI_phid_Method
{
public
function
getMethodDescription
()
{
return
"Retrieve information about arbitrary PHIDs."
;
}
public
function
defineParamTypes
()
{
return
array
(
'phids'
=>
'required list<phid>'
,
);
}
public
function
defineReturnType
()
{
return
'nonempty dict<string, wild>'
;
}
public
function
defineErrorTypes
()
{
return
array
();
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$phids
=
$request
->
getValue
(
'phids'
);
$handles
=
id
(
new
PhabricatorObjectHandleData
(
$phids
))
->
setViewer
(
$request
->
getUser
())
->
loadHandles
();
$result
=
array
();
foreach
(
$handles
as
$phid
=>
$handle
)
{
if
(
$handle
->
isComplete
())
{
$result
[
$phid
]
=
$this
->
buildHandleInformationDictionary
(
$handle
);
}
}
return
$result
;
}
}
Event Timeline
Log In to Comment