public static function Version::compare

Compares a Doctrine version with the current one.

Parameters

string $version Doctrine version to compare.:

Return value

int Returns -1 if older, 0 if it is the same, 1 if version passed as argument is newer.

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Version.php, line 48

Class

Version
Class to store and retrieve the version of Doctrine

Namespace

Doctrine\Common

Code

public static function compare($version) {
  $currentVersion = str_replace(' ', '', strtolower(self::VERSION));
  $version = str_replace(' ', '', $version);
  return version_compare($version, $currentVersion);
}