Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F950427
PHIDInfoConduitAPIMethod.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
PHIDInfoConduitAPIMethod.php
View Options
<?php
final
class
PHIDInfoConduitAPIMethod
extends
PHIDConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'phid.info'
;
}
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_DEPRECATED
;
}
public
function
getMethodStatusDescription
()
{
return
pht
(
"Replaced by 'phid.query'."
);
}
public
function
getMethodDescription
()
{
return
pht
(
'Retrieve information about an arbitrary PHID.'
);
}
protected
function
defineParamTypes
()
{
return
array
(
'phid'
=>
'required phid'
,
);
}
protected
function
defineReturnType
()
{
return
'nonempty dict<string, wild>'
;
}
protected
function
defineErrorTypes
()
{
return
array
(
'ERR-BAD-PHID'
=>
pht
(
'No such object exists.'
),
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$phid
=
$request
->
getValue
(
'phid'
);
$handle
=
id
(
new
PhabricatorHandleQuery
())
->
setViewer
(
$request
->
getUser
())
->
withPHIDs
(
array
(
$phid
))
->
executeOne
();
if
(!
$handle
->
isComplete
())
{
throw
new
ConduitException
(
'ERR-BAD-PHID'
);
}
return
$this
->
buildHandleInformationDictionary
(
$handle
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 2:05 PM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
224182
Default Alt Text
PHIDInfoConduitAPIMethod.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment