Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93132930
ConduitAPI_phpast_version_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:09
Size
905 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 11:09 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22581575
Attached To
rPH Phabricator
ConduitAPI_phpast_version_Method.php
View Options
<?php
/**
* @group conduit
*/
final
class
ConduitAPI_phpast_version_Method
extends
ConduitAPI_phpast_Method
{
public
function
getMethodDescription
()
{
return
"Get server xhpast version."
;
}
public
function
defineParamTypes
()
{
return
array
();
}
public
function
defineReturnType
()
{
return
'string'
;
}
public
function
defineErrorTypes
()
{
return
array
(
'ERR-NOT-FOUND'
=>
'xhpast was not found on the server'
,
'ERR-COMMAND-FAILED'
=>
'xhpast died with a nonzero exit code'
,
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$path
=
xhpast_get_binary_path
();
if
(!
Filesystem
::
pathExists
(
$path
))
{
throw
new
ConduitException
(
'ERR-NOT-FOUND'
);
}
list
(
$err
,
$stdout
)
=
exec_manual
(
'%s --version'
,
$path
);
if
(
$err
)
{
throw
new
ConduitException
(
'ERR-COMMAND-FAILED'
);
}
return
trim
(
$stdout
);
}
}
Event Timeline
Log In to Comment