Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102425907
PHIDQueryConduitAPIMethod.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
Thu, Feb 20, 14:45
Size
913 B
Mime Type
text/x-php
Expires
Sat, Feb 22, 14:45 (2 d)
Engine
blob
Format
Raw Data
Handle
24354720
Attached To
rPH Phabricator
PHIDQueryConduitAPIMethod.php
View Options
<?php
final
class
PHIDQueryConduitAPIMethod
extends
PHIDConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'phid.query'
;
}
public
function
getMethodDescription
()
{
return
pht
(
'Retrieve information about arbitrary PHIDs.'
);
}
protected
function
defineParamTypes
()
{
return
array
(
'phids'
=>
'required list<phid>'
,
);
}
protected
function
defineReturnType
()
{
return
'nonempty dict<string, wild>'
;
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$phids
=
$request
->
getValue
(
'phids'
);
$handles
=
id
(
new
PhabricatorHandleQuery
())
->
setViewer
(
$request
->
getUser
())
->
withPHIDs
(
$phids
)
->
execute
();
$result
=
array
();
foreach
(
$handles
as
$phid
=>
$handle
)
{
if
(
$handle
->
isComplete
())
{
$result
[
$phid
]
=
$this
->
buildHandleInformationDictionary
(
$handle
);
}
}
return
$result
;
}
}
Event Timeline
Log In to Comment