public static function toVersion($version)
    {
        $components = self::toComponents($version);

        return new Version(
            $components['major'],
            $components['minor'],
            $components['patch'],
            $components['pre'],
            $components['build']
        );
    }
public static function toVersion($version)
    {
        $components = self::toComponents($version);

        return new Version(
            $components['major'],
            $components['minor'],
            $components['patch'],
            $components['pre'],
            $components['build']
        );
    }
public static function toVersion ( $ version ) { $ components = self :: toComponents ( $ version ) ; return new Version ( $ components [ 'major' ] , $ components [ 'minor' ] , $ components [ 'patch' ] , $ components [ 'pre' ] , $ components [ 'build' ] ) ; }
Returns a Version instance for the string representation.

@param string $version The string representation.

@return Version A Version instance.
Returns a Version instance for the string representation .