src/POData/Common/Version.php
/**
     * Compare this version with a target version.
     * 
     * @param Version $targetVersion The target version to compare with.
     * 
     * @return int Return 1 if this version is greater than target version
     *                 -1 if this version is less than the target version
     *                  0 if both are equal.
     */
Compare this version with a target version.

@param Version $targetVersion The target version to compare with.

@return int Return 1 if this version is greater than target version
-1 if this version is less than the target version
0 if both are equal.
Compare this version with a target version . @param Version $targetVersion The target version to compare with . @return int Return 1 if this version is greater than target version - 1 if this version is less than the target version 0 if both are equal .
public function compare(Version $targetVersion)
    {
        if ($this->major > $targetVersion->major) {
            return 1;
        }
        if ($this->major == $targetVersion->major) {
            if ($this->minor == $targetVersion->minor) {
                return 0;
            }
            if ($this->minor > $targetVersion->minor) {
                return 1;
            }
        }
        return -1;
    }
public function compare ( Version $ targetVersion ) { if ( $ this -> major > $ targetVersion -> major ) { return 1 ; } if ( $ this -> major == $ targetVersion -> major ) { if ( $ this -> minor == $ targetVersion -> minor ) { return 0 ; } if ( $ this -> minor > $ targetVersion -> minor ) { return 1 ; } } return - 1 ; }
Compare this version with a target version.
Compare this version with a target version .