Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F568040
PHIDQueryConduitAPIMethod.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
913 B
Referenced Files
None
Subscribers
None
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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 1:12 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
120097
Default Alt Text
PHIDQueryConduitAPIMethod.php (913 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment