src/Version/MicrosoftInternetExplorer.php
/**
     * returns the version of the operating system/platform
     */
returns the version of the operating system/platform
returns the version of the operating system / platform
public function detectVersion(string $useragent): VersionInterface
    {
        $version = $this->trident->detectVersion($useragent);
        if (null !== $version->getMajor()) {
            foreach (self::VERSIONS as $engineVersion => $ieVersion) {
                if (!version_compare($version->getMajor(), (string) $engineVersion, '>=')) {
                    continue;
                }
                try {
                    return $this->versionFactory->set($ieVersion);
                } catch (NotNumericException $e) {
                    $this->logger->info($e);
                }
            }
        }
        $doMatch = preg_match('/MSIE (?P<version>[\d\.]+)/', $useragent, $matches);
        if ($doMatch) {
            try {
                return $this->versionFactory->set($matches['version']);
            } catch (NotNumericException $e) {
                $this->logger->info($e);
            }
        }
        return new NullVersion();
    }
public function detectVersion ( string $ useragent ) : VersionInterface { $ version = $ this -> trident -> detectVersion ( $ useragent ) ; if ( null !== $ version -> getMajor ( ) ) { foreach ( self :: VERSIONS as $ engineVersion => $ ieVersion ) { if ( ! version_compare ( $ version -> getMajor ( ) , ( string ) $ engineVersion , '>=' ) ) { continue ; } try { return $ this -> versionFactory -> set ( $ ieVersion ) ; } catch ( NotNumericException $ e ) { $ this -> logger -> info ( $ e ) ; } } } $ doMatch = preg_match ( '/MSIE (?P<version>[\d\.]+)/' , $ useragent , $ matches ) ; if ( $ doMatch ) { try { return $ this -> versionFactory -> set ( $ matches [ 'version' ] ) ; } catch ( NotNumericException $ e ) { $ this -> logger -> info ( $ e ) ; } } return new NullVersion ( ) ; }
returns the version of the operating system/platform
returns the version of the operating system / platform