public function isPartOf(Version $version)
    {
        if (is_null($version->getOperator()))
        {
            if ($this->major == $version->getMajor()  && $this->minor == $version->getMinor() && $this->path == $version->getPath())
                return true;
            return false;
        }

        switch ($version->getOperator())
        {
            case self::GREATER:
                return $this->mustGreaterThan($version);
                break;

            case self::GREATER_EQUAL:
                return $this->mustGreaterEqualThan($version);
                break;
            case self::TILDE:
                return $this->mustTilde($version);
                break;
        }
    }
public function isPartOf(Version $version)
    {
        if (is_null($version->getOperator()))
        {
            if ($this->major == $version->getMajor()  && $this->minor == $version->getMinor() && $this->path == $version->getPath())
                return true;
            return false;
        }

        switch ($version->getOperator())
        {
            case self::GREATER:
                return $this->mustGreaterThan($version);
                break;

            case self::GREATER_EQUAL:
                return $this->mustGreaterEqualThan($version);
                break;
            case self::TILDE:
                return $this->mustTilde($version);
                break;
        }
    }
public function isPartOf ( Version $ version ) { if ( is_null ( $ version -> getOperator ( ) ) ) { if ( $ this -> major == $ version -> getMajor ( ) && $ this -> minor == $ version -> getMinor ( ) && $ this -> path == $ version -> getPath ( ) ) return true ; return false ; } switch ( $ version -> getOperator ( ) ) { case self :: GREATER : return $ this -> mustGreaterThan ( $ version ) ; break ; case self :: GREATER_EQUAL : return $ this -> mustGreaterEqualThan ( $ version ) ; break ; case self :: TILDE : return $ this -> mustTilde ( $ version ) ; break ; } }
Is this version part of another version?

@param Chee\Version\Version $version
@return bool
Is this version part of another version?