Page MenuHomestyx hydra

ConduitAPI_phpast_version_Method.php
No OneTemporary

ConduitAPI_phpast_version_Method.php

<?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);
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, May 26, 9:35 PM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1551343
Default Alt Text
ConduitAPI_phpast_version_Method.php (905 B)

Event Timeline