public static function Version::compare in Plug 7
Compares a Doctrine version with the current one.
Parameters
string $version Doctrine version to compare.:
Return value
int -1 if older, 0 if it is the same, 1 if version passed as argument is newer.
File
- lib/
doctrine/ common/ lib/ Doctrine/ Common/ Version.php, line 46
Class
- Version
- Class to store and retrieve the version of Doctrine.
Namespace
Doctrine\CommonCode
public static function compare($version) {
$currentVersion = str_replace(' ', '', strtolower(self::VERSION));
$version = str_replace(' ', '', $version);
return version_compare($version, $currentVersion);
}