public static function Nodejs::checkServerVersion in Node.js integration 7
2 calls to Nodejs::checkServerVersion()
- Nodejs::httpRequest in ./
nodejs.module - nodejs_requirements in ./
nodejs.install - Implements hook_requirements()
File
- ./
nodejs.module, line 850
Class
Code
public static function checkServerVersion() {
$server_version = self::getServerVersion();
if (!$server_version) {
// Version number is missing. Assume incompatibility.
return FALSE;
}
$current_parts = explode('.', $server_version);
$required_parts = explode('.', NODEJS_SERVER_VERSION);
$current_major = reset($current_parts);
$required_major = reset($required_parts);
if ($current_major != $required_major || version_compare($server_version, NODEJS_SERVER_VERSION) < 0) {
return FALSE;
}
return TRUE;
}