Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93133139
ConduitAPI_phpast_getast_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
Tue, Nov 26, 11:11
Size
738 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 11:11 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22581623
Attached To
rPH Phabricator
ConduitAPI_phpast_getast_Method.php
View Options
<?php
/**
* @group conduit
*/
final
class
ConduitAPI_phpast_getast_Method
extends
ConduitAPI_phpast_Method
{
public
function
getMethodDescription
()
{
return
"Parse a piece of PHP code."
;
}
public
function
defineParamTypes
()
{
return
array
(
'code'
=>
'required string'
,
);
}
public
function
defineReturnType
()
{
return
'nonempty dict'
;
}
public
function
defineErrorTypes
()
{
return
array
(
'ERR-XHPAST-LEY'
=>
'xhpast got Rickrolled'
,
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$source
=
$request
->
getValue
(
'code'
);
$future
=
xhpast_get_parser_future
(
$source
);
list
(
$stdout
)
=
$future
->
resolvex
();
return
json_decode
(
$stdout
,
true
);
}
}
Event Timeline
Log In to Comment