Get OS type.

@return OS type
5497
public static Type getType() {
        String osName = System.getProperty("os.name").toLowerCase();

        if (osName.contains("windows")) {
            return Type.WINDOWS;
        } else if (osName.contains("linux")) {
            return Type.LINUX;
        } else if (osName.contains("mac")) {
            return Type.MAC;
        }

        return Type.UNKNOWN;
    }
839140
protected function getType()
  {
    if($this->currObj instanceof TeamSpeak3_Node_Server)
    {
      return "server";
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Channel)
    {
      return "channel";
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Client)
    {
      return "client";
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Servergroup || $this->currObj instanceof TeamSpeak3_Node_Channelgroup)
    {
      return "group";
    }

    return "host";
  }
1060633
private static String getOS()
    {
        if (SystemUtils.IS_OS_WINDOWS) {
            return "Windows";
        }
        if (SystemUtils.IS_OS_MAC_OSX) {
            return "Darwin";
        }
        if (SystemUtils.IS_OS_LINUX) {
            return "Linux";
        }
        throw new UnsupportedOperationException("Unknown OS " + SystemUtils.OS_NAME);
    }
417343
public function oSVersion()
    {
        $UserAgent = self::agent();
        if (preg_match_all('/windows nt 10/i', $UserAgent)) {
            $OsVersion = 'Windows 10';
        } elseif (preg_match_all('/windows nt 6.3/i', $UserAgent)) {
            $OsVersion = 'Windows 8.1';
        } elseif (preg_match_all('/windows nt 6.2/i', $UserAgent)) {
            $OsVersion = 'Windows 8';
        } elseif (preg_match_all('/windows nt 6.1/i', $UserAgent)) {
            $OsVersion = 'Windows 7';
        } elseif (preg_match_all('/windows nt 6.0/i', $UserAgent)) {
            $OsVersion = 'Windows Vista';
        } elseif (preg_match_all('/windows nt 5.1/i', $UserAgent)) {
            $OsVersion = 'Windows Xp';
        } elseif (preg_match_all('/windows xp/i', $UserAgent)) {
            $OsVersion = 'Windows Xp';
        } elseif (preg_match_all('/windows me/i', $UserAgent)) {
            $OsVersion = 'Windows Me';
        } elseif (preg_match_all('/win98/i', $UserAgent)) {
            $OsVersion = 'Windows 98';
        } elseif (preg_match_all('/win95/i', $UserAgent)) {
            $OsVersion = 'Windows 95';
        } elseif (preg_match_all('/Windows Phone +[0-9]/i', $UserAgent, $match)) {
            $OsVersion = $match;
        } elseif (preg_match_all('/Android +[0-9]/i', $UserAgent, $match)) {
            $OsVersion = $match;
        } elseif (preg_match_all('/Linux +x[0-9]+/i', $UserAgent, $match)) {
            $OsVersion = $match;
        } elseif (preg_match_all('/mac os x [0-9]+/i', $UserAgent, $match)) {
            $OsVersion = $match;
        } elseif (preg_match_all('/os [0-9]+/i', $UserAgent, $match)) {
            $OsVersion = $match;
        }

        return isset($OsVersion) ? $OsVersion : false;
    }
704049
protected function getStorageTypeObject()
    {
        $type = $this->getStorageType();
        if (is_string($type)) {
            $type = Type::getType($type);
        }

        return $type;
    }
982467
def get_os_type(self, version_text):  # pylint: disable=no-self-use
        """"""
        os_type = None
        if version_text is None:
            return os_type

        match = re.search("(XR|XE|NX-OS)", version_text)
        if match:
            os_type = match.group(1)
        else:
            os_type = 'IOS'

        if os_type == "XR":
            match = re.search("Build Information", version_text)
            if match:
                os_type = "eXR"
            match = re.search("XR Admin Software", version_text)
            if match:
                os_type = "Calvados"
        return os_type
113443
public function getDeviceType()
    {
        if ($this->deviceType === null) {
            $this->setDeviceType($this->detectDeviceType());
        }

        return $this->deviceType;
    }
409842
public function getDatabaseType()
    {
        $clazz = get_class($this);
        $pos = strpos($clazz, 'Platform');

        return strtolower(substr($clazz, 0, $pos));
    }
888938
public String getPcType() {

        String result = m_loginForm.getPcType();
        if (result == null) {
            result = CmsLoginForm.PC_TYPE_PUBLIC;
        }
        return result;
    }
408857
public static function getSolrType() {
        $relationships = PlatformAppConfig::get('relationships');
        if (!isset($relationships['solr'])) {
            return FALSE;
        }
        list($solr_key, ) = explode(':', $relationships['solr']);
        $solr_config = self::get($solr_key);
        if (!isset($solr_config['type'])) {
            return FALSE;
        }
        return $solr_config['type'];
    }
448306
protected function magic_get_devicetypeinuse() {
        if (empty($this->_devicetypeinuse)) {
            $this->_devicetypeinuse = core_useragent::get_user_device_type();
        }
        return $this->_devicetypeinuse;
    }
270530
protected function _getType() {
        $className = strtolower(get_class($this));
        $classNameParts = explode('_', $className);
        $type = array_pop($classNameParts);
        if (array_key_exists($type, self::$_mapping)) {
            return self::$_mapping[$type];
        }
        return self::DEFAULT_TYPE;
    }
1277637
public function getOperatingSystem()
    {
        foreach ($this::$operatingSystems as $os => $UA) {
            $is_os = 'is'.$os;
            if ($this->$is_os()) {
                return $os;
            }
        }
        return '';
    }
971751
protected function guessType()
    {
        $os = strtolower(PHP_OS);
        if (false !== strpos($os, 'cygwin')) {
            return self::OS_TYPE_CYGWIN;
        }
        if (false !== strpos($os, 'darwin')) {
            return self::OS_TYPE_DARWIN;
        }
        if (false !== strpos($os, 'bsd')) {
            return self::OS_TYPE_BSD;
        }
        if (0 === strpos($os, 'win')) {
            return self::OS_TYPE_WINDOWS;
        }

        return self::OS_TYPE_UNIX;
    }
1140812
public function getDeviceType()
    {
        $device = $this->session->get('device');

        if (empty($device)) {

            $detector = $this->getLibrary();

            if ($detector->isMobile()) {
                $device = 'mobile';
            } else if ($detector->isTablet()) {
                $device = 'tablet';
            } else {
                $device = 'desktop';
            }

            $this->session->set('device', $device);
        }

        return $device;
    }
995056
public function getDocumentType()
    {
        if (!$this->version) {
            $version = (string) $this->VERSION;

            switch ($version) {
                case '2.1':
                    $this->version = self::VCARD21;
                    break;
                case '3.0':
                    $this->version = self::VCARD30;
                    break;
                case '4.0':
                    $this->version = self::VCARD40;
                    break;
                default:
                    // We don't want to cache the version if it's unknown,
                    // because we might get a version property in a bit.
                    return self::UNKNOWN;
            }
        }

        return $this->version;
    }
771045
public function getType()
    {
        $class = get_class($this);

        if (strpos($class, 'CoreBundle\Entity\Operation') !== false) {
            return self::TYPE_OPERATION;
        }
        if (strpos($class, 'CoreBundle\Entity\Activity') !== false) {
            return self::TYPE_ACTIVITY;
        }
        if (strpos($class, 'CoreBundle\Entity\Milestone') !== false) {
            return self::TYPE_MILESTONE;
        }
        if (strpos($class, 'CoreBundle\Entity\Campaign') !== false) {
            return self::TYPE_CAMPAIGN;
        }

        return false;
    }