Get system architecture

@return string
161442
public function arch()
    {
        if ($this->host_os === 'WINDOWS') {
            $wmi = new \COM("winmgmts:\\\\.\\root\\cimv2");
            $cpu=  $wmi->ExecQuery("Select * from Win32_Processor");

            foreach ($cpu as $c) {
                $arch = '32-bit';
                $cpu_arch = $c->AddressWidth;

                if ($cpu_arch != 32) {
                    $os = $wmi->ExecQuery("Select * from Win32_OperatingSystem");

                    foreach ($os as $o) {
                        if ($o->Version >= 6.0) {
                            $arch = objItem.OSArchitecture;
                        }
                    }
                }
            }
        } else {
            $arch = shell_exec('arch');
        }
        return trim($arch);
    }
314731
private function getCurrentOS()
    {
        switch (true) {
            case mb_stristr(PHP_OS, 'DAR'): return self::systemMacOS;
            case mb_stristr(PHP_OS, 'WIN'): return self::systemWindows;
            default: return self::systemUnix;
        }
    }
755910
public static String getSystemInformation() {
        String ret = System.getProperty("java.vendor");
        ret += " " + System.getProperty("java.version");
        ret += " on " + System.getProperty("os.name");
        ret += " " + System.getProperty("os.version");
        return ret;
    }
365904
public function getFilesystemSchemes() {
    $schemes = ['public'];
    if (!empty(Settings::get('file_private_path'))) {
      $schemes[] = 'private';
    }
    return array_merge($schemes, $this->flysystemFactory->getSchemes());
  }
763792
public function getEnvironment()
    {
        if (!empty($this->environnement)) {
            $host      = gethostname();
            $authority = $this->request->getUri()->getAuthority();

            foreach ($this->environnement as $key => $env) {
                if (in_array($host, $env) || in_array($authority, $env)) {
                    return $key;
                }
            }
        }

        return '';
    }
31453
private function _get_Win32_OperatingSystem()
    {
        if ($this->_Win32_OperatingSystem === null) $this->_Win32_OperatingSystem = CommonFunctions::getWMI($this->_wmi, 'Win32_OperatingSystem', array('CodeSet', 'Locale', 'LastBootUpTime', 'LocalDateTime', 'Version', 'ServicePackMajorVersion', 'Caption', 'OSArchitecture', 'TotalVisibleMemorySize', 'FreePhysicalMemory'));
        return $this->_Win32_OperatingSystem;
    }
1131282
public function getConfiguration(){
        $rest = $this->getService( self::API_NETWORK_SHARE_SAMBA);
        $rest->GET();

        return $rest->getResult( models\NetworkShare\SambaConfig::class);
    }
675830
public function getData()
    {
        $systemInformation                  = [];
        $systemInformation['newup_version'] = Application::VERSION;

        return $this->dataArray + $systemInformation + $this->collectData();
    }
1268886
protected function getSystemProperties()
    {
        $constants = get_defined_constants(true);

        $keys = array_filter(array_keys($constants['user']), function ($key) {
            return strstr($key, 'PROPERTY') !== false;

        });

        return array_intersect_key($constants['user'], array_flip($keys));
    }
187874
private function _get_Win32_Processor()
    {
        if ($this->_Win32_Processor === null) $this->_Win32_Processor = CommonFunctions::getWMI($this->_wmi, 'Win32_Processor', array('LoadPercentage', 'AddressWidth', 'Name', 'L2CacheSize', 'L3CacheSize', 'CurrentClockSpeed', 'ExtClock', 'NumberOfCores', 'NumberOfLogicalProcessors', 'MaxClockSpeed'));
        return $this->_Win32_Processor;
    }
307265
public function getRam()
    {

        // Time?
        if (!empty($this->settings['timer'])) {
            $t = new Timer('Memory');
        }

        $total_memory = 0;
        $free_memory = 0;

        foreach ($this->wmi->ExecQuery('SELECT TotalPhysicalMemory FROM Win32_ComputerSystem') as $cs) {
            $total_memory = $cs->TotalPhysicalMemory;
            break;
        }

        foreach ($this->wmi->ExecQuery('SELECT FreePhysicalMemory FROM Win32_OperatingSystem') as $os) {
            $free_memory = $os->FreePhysicalMemory;
            break;
        }

        return array(
            'type' => 'Physical',
            'total' => $total_memory,
            'free' => $free_memory * 1024,
        );
    }
539060
public function getCacheDir()
    {
        // allows container rebuild when config or version changes
        $hash = Zephir::VERSION.$this->environment.serialize($this->extraConfigFiles);
        $home = getenv('HOME') ?: (getenv('HOMEDRIVE').DIRECTORY_SEPARATOR.getenv('HOMEPATH'));

        if (is_macos()) {
            $cacheDir = getenv('XDG_CACHE_HOME') ?: $home.'/Library/Caches';
            $cacheDir .= '/Zephir';
        } elseif (is_windows()) {
            $cacheDir = getenv('LOCALAPPDATA') ?: $home;
            $cacheDir .= '\\Zephir\\Cache';
        } else {
            $cacheDir = getenv('XDG_CACHE_HOME') ?: $home.'/.cache';
            $cacheDir .= '/zephir';
        }

        $path = $cacheDir.DIRECTORY_SEPARATOR.substr(md5($hash), 0, 16);
        if (!is_dir($path) && !mkdir($path, 0777, true) && !is_dir($path)) {
            throw new \RuntimeException(sprintf('Directory "%s" was not created', $path));
        }

        return $path;
    }
1343989
public function getSystemId()
    {
        if (!is_null($this->_systemId)) {
            return $this->_systemId;
        }
        preg_match('/' . ucfirst($this->moduleType) . '([A-Za-z]+)\\\Module/', get_class($this), $matches);
        if (!isset($matches[1])) {
            throw new Exception(get_class($this) . " is not set up correctly!");
        }

        return $this->_systemId = $matches[1];
    }
586480
public function platform()
    {
        if (preg_match('/linux/i', $this->server['HTTP_USER_AGENT'])) {
            return 'linux';
        } elseif (preg_match('/macintosh|mac os x/i', $this->server['HTTP_USER_AGENT'])) {
            return 'mac';
        } elseif (preg_match('/windows|win32/i', $this->server['HTTP_USER_AGENT'])) {
            return 'windows';
        }
        return 'unknown';
    }
707571
public function get_icon_system() {

        // Getting all the candidate functions.
        $system = false;
        if (isset($this->iconsystem) && \core\output\icon_system::is_valid_system($this->iconsystem)) {
            return $this->iconsystem;
        }
        foreach ($this->parent_configs as $parent_config) {
            if (isset($parent_config->iconsystem) && \core\output\icon_system::is_valid_system($parent_config->iconsystem)) {
                return $parent_config->iconsystem;
            }
        }
        return \core\output\icon_system::STANDARD;
    }
54352
public function getOS()
    {
        $osList = array(
            'windows' => array(
                'win',
                'UWIN',
            ),
            'mac' => array(
                'mac',
                'darwin',
            ),
            'linux' => array(
                'linux',
                'cygwin',
                'GNU',
                'FreeBSD',
                'OpenBSD',
                'NetBSD',
            ),
        );

        $sysOS = strtolower(PHP_OS);

        foreach ($osList as $osName => $osSystem) {
            if (preg_match('/^('.implode('|', $osSystem).')/i', $sysOS)) {
                return $osName;
            }
        }

        return false;
    }
982611
public function GetSystemUserID() {
      $SystemUserID = C('Garden.SystemUserID');
      if ($SystemUserID)
         return $SystemUserID;
      
      $SystemUser = array(
         'Name' => T('System'),
         'Photo' => Asset('/applications/dashboard/design/images/usericon.png', TRUE),
         'Password' => RandomString('20'),
         'HashMethod' => 'Random',
         'Email' => 'system@domain.com',
         'DateInserted' => Gdn_Format::ToDateTime(),
         'Admin' => '2'
      );
      
      $this->EventArguments['SystemUser'] = &$SystemUser;
      $this->FireEvent('BeforeSystemUser');
      
      $SystemUserID = $this->SQL->Insert($this->Name, $SystemUser);
      
      SaveToConfig('Garden.SystemUserID', $SystemUserID);
      return $SystemUserID;
   }