src/Version/Maxthon.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
    {
        if (false !== mb_strpos($useragent, 'MyIE2')) {
            try {
                return $this->versionFactory->set('2.0');
            } catch (NotNumericException $e) {
                $this->logger->info($e);
            }
            return new NullVersion();
        }
        if (false !== mb_strpos($useragent, 'MyIE')) {
            $this->versionFactory->setRegex(self::REGEX);
            try {
                return $this->versionFactory->detectVersion($useragent, self::SEARCH_OLD);
            } catch (NotNumericException $e) {
                $this->logger->info($e);
            }
            return new NullVersion();
        }
        try {
            return $this->versionFactory->detectVersion($useragent, self::SEARCHES);
        } catch (NotNumericException $e) {
            $this->logger->info($e);
        }
        return new NullVersion();
    }
public function detectVersion ( string $ useragent ) : VersionInterface { if ( false !== mb_strpos ( $ useragent , 'MyIE2' ) ) { try { return $ this -> versionFactory -> set ( '2.0' ) ; } catch ( NotNumericException $ e ) { $ this -> logger -> info ( $ e ) ; } return new NullVersion ( ) ; } if ( false !== mb_strpos ( $ useragent , 'MyIE' ) ) { $ this -> versionFactory -> setRegex ( self :: REGEX ) ; try { return $ this -> versionFactory -> detectVersion ( $ useragent , self :: SEARCH_OLD ) ; } catch ( NotNumericException $ e ) { $ this -> logger -> info ( $ e ) ; } return new NullVersion ( ) ; } try { return $ this -> versionFactory -> detectVersion ( $ useragent , self :: SEARCHES ) ; } 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