Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1369388
PasteInfoConduitAPIMethod.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
PasteInfoConduitAPIMethod.php
View Options
<?php
final
class
PasteInfoConduitAPIMethod
extends
PasteConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'paste.info'
;
}
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_DEPRECATED
;
}
public
function
getMethodStatusDescription
()
{
return
"Replaced by 'paste.query'."
;
}
public
function
getMethodDescription
()
{
return
'Retrieve an array of information about a paste.'
;
}
public
function
defineParamTypes
()
{
return
array
(
'paste_id'
=>
'required id'
,
);
}
public
function
defineReturnType
()
{
return
'nonempty dict'
;
}
public
function
defineErrorTypes
()
{
return
array
(
'ERR_BAD_PASTE'
=>
'No such paste exists'
,
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$paste_id
=
$request
->
getValue
(
'paste_id'
);
$paste
=
id
(
new
PhabricatorPasteQuery
())
->
setViewer
(
$request
->
getUser
())
->
withIDs
(
array
(
$paste_id
))
->
needRawContent
(
true
)
->
executeOne
();
if
(!
$paste
)
{
throw
new
ConduitException
(
'ERR_BAD_PASTE'
);
}
return
$this
->
buildPasteInfoDictionary
(
$paste
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jul 7, 3:14 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
321248
Default Alt Text
PasteInfoConduitAPIMethod.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment