src/Version/RimOs.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_stripos($useragent, 'bb10') && false === mb_stripos($useragent, 'version')) {
            try {
                return $this->versionFactory->set('10.0.0');
            } catch (NotNumericException $e) {
                $this->logger->info($e);
            }
            return new NullVersion();
        }
        $searches = ['BlackBerry[0-9a-z]+', 'BlackBerry; [0-9a-z]+\/', 'BlackBerrySimulator'];
        if (false !== mb_stripos($useragent, 'bb10') || false === mb_stripos($useragent, 'opera')) {
            array_unshift($searches, 'Version');
        }
        try {
            return $this->versionFactory->detectVersion($useragent, $searches);
        } catch (NotNumericException $e) {
            $this->logger->info($e);
        }
        return new NullVersion();
    }
public function detectVersion ( string $ useragent ) : VersionInterface { if ( false !== mb_stripos ( $ useragent , 'bb10' ) && false === mb_stripos ( $ useragent , 'version' ) ) { try { return $ this -> versionFactory -> set ( '10.0.0' ) ; } catch ( NotNumericException $ e ) { $ this -> logger -> info ( $ e ) ; } return new NullVersion ( ) ; } $ searches = [ 'BlackBerry[0-9a-z]+' , 'BlackBerry; [0-9a-z]+\/' , 'BlackBerrySimulator' ] ; if ( false !== mb_stripos ( $ useragent , 'bb10' ) || false === mb_stripos ( $ useragent , 'opera' ) ) { array_unshift ( $ searches , 'Version' ) ; } try { return $ this -> versionFactory -> detectVersion ( $ useragent , $ 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