Get the default User-Agent

@return string
974717
private function defaultUserAgent()
    {
        static $defaultAgent;

        if ($defaultAgent === null) {
            $defaultAgent = sprintf('Pletfix/%s curl/%s PHP/%s', Application::VERSION, curl_version()['version'], PHP_VERSION);
        }

        return $defaultAgent;
    }
18833
public function browserVersion()
    {
        $UserAgent = self::agent();
        $B_Agent = self::Browser()['agent'];
        if ($B_Agent !== null) {
            $known = ['Version', $B_Agent, 'other'];
            $pattern = '#(?<browser>'.implode('|', $known).
            ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
            if (!preg_match_all($pattern, $UserAgent, $matches)) {
            }
            $i = count($matches['browser']);
            if ($i != 1) {
                if (strripos($UserAgent, 'Version') < strripos($UserAgent, $B_Agent)) {
                    $Version = $matches['version'][0];
                } else {
                    $Version = $matches['version'][0];
                }
            } else {
                $Version = $matches['version'][0];
            }
        }

        return $Version;
    }
760883
private String getDefaultUserAgent(Request<?> request) {
        String userAgentMarker = request.getOriginalRequest().getRequestClientOptions().getClientMarker(RequestClientOptions
                                                                                                            .Marker.USER_AGENT);
        String userAgent = ClientConfiguration.DEFAULT_USER_AGENT;
        if (StringUtils.hasValue(userAgentMarker)) {
            userAgent += " " + userAgentMarker;
        }
        return userAgent;
    }
1219899
public function getCurrentUser()
    {
        $returnValue = null;

    	if(!common_session_SessionManager::isAnonymous()){
        	$userUri = \common_session_SessionManager::getSession()->getUser()->getIdentifier();
			if(!empty($userUri)){
        		$returnValue = new core_kernel_classes_Resource($userUri);
			} else {
				common_Logger::d('no userUri');
			}
    	}

        return $returnValue;
    }
848210
public function getDefaultManagerName()
    {
        if (isset($this->managers[$this->defaultManager])) {
            return $this->defaultManager;
        }

        return head($this->managers);
    }
1203193
public function user_agent($user_agent = NULL)
	{
		if ($user_agent !== NULL)
		{
			$this->_user_agent = $user_agent;
			return $this;
		}
		return $this->_user_agent;
	}
524774
public function getDefaultUserAgent(): string
    {
        if (! $this->defaultUserAgent) {
            $currentMethodName = __FUNCTION__;
            $isAdapterUserAgent = method_exists($this->getAdapter(), $currentMethodName);
            if ($isAdapterUserAgent) {
                $this->defaultUserAgent = $this->getAdapter()->$currentMethodName();
            } else {
                $defaultAgent = 'Swoft/' . App::version();
                if (! Coroutine::isSupportCoroutine() && \extension_loaded('curl') && \function_exists('curl_version')) {
                    $defaultAgent .= ' curl/' . \curl_version()['version'];
                }
                $defaultAgent .= ' PHP/' . PHP_VERSION;
                $this->defaultUserAgent = $defaultAgent;
            }
        }

        return $this->defaultUserAgent;
    }
521372
public function getDefaultConfig() {
		$configs = [];
		$schema = $this->getFullSchema();
		foreach ($schema as $field => $metadata) {
			$configs[$this->alias][$field] = Hash::get($metadata, 'default');
		}

		return $configs;
	}
504877
public function getDefault()
    {
        $sDefault  = $this->oCi->config->item('languages_default');
        $oLanguage = $this->getByCode($sDefault);

        return !empty($oLanguage) ? $oLanguage : false;
    }
316236
public function defaultAction()
    {
        $lng = \Cmf\Language\Factory::get($this);
        HelperFactory::getMeta()->clear();
        HelperFactory::getJS()->clear();
        HelperFactory::getStyle()->clear();
        HelperFactory::getTitle()->setTitle('Redirect');
        if ($path = urldecode(Application::getRequest()->get('path'))) {
            HelperFactory::getMeta()->addTag('refresh', '0; url=' . $path);
            $response = ['path' => $path];
        } else {
            $response = ['error' => $lng['error_badPath']];
        }

        return $response;
    }
450787
protected function getDefaultSubscription()
    {
        if (!$this->defaultSubscription) {
            $this->defaultSubscription = $this->app->make(StandardSubscription::class,
                [self::IDENTIFIER, t('User Deactivated')]);
        }

        return $this->defaultSubscription;
    }
1008997
public function getUserAgent()
    {
        if (isset($this->_userAgent)) {
            return $this->_userAgent;
        }
        return $this->_userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
    }
567098
public function getUserAgentName()
    {
        static $user_agent_name = '';

        if (empty($user_agent_name)) {
            $user_agent_name = 'B2BApi Client/' . $this->api_client->getClientVersion() . ' curl/'
                . \curl_version()['version'] . ' PHP/' . PHP_VERSION;
        }

        return $user_agent_name;
    }
409227
public function defaults()
    {
        $baseDir = rtrim(realpath(__DIR__.'/../../../'), '/');
        $confDir = $baseDir.'/config';

        return $this->loadFile($confDir.'/admin.config.default.json');
    }
668162
private function _user_agent() {

        // browser version: 9 or 10
        $version = rand(9, 10);

        // windows version; here are the meanings:
        // Windows NT 6.2   ->  Windows 8                                       //  can have IE10
        // Windows NT 6.1   ->  Windows 7                                       //  can have IE9 or IE10
        // Windows NT 6.0   ->  Windows Vista                                   //  can have IE9
        $major_version = 6;

        $minor_version =

            // for IE9 Windows can have "0", "1" or "2" as minor version number
            $version == 8 || $version == 9 ? rand(0, 2) :

            // for IE10 Windows will have "2" as major version number
            2;

        // add some extra information
        $extras = rand(0, 3);

        // return the random user agent string
        return 'Mozilla/5.0 (compatible; MSIE ' . $version . '.0; Windows NT ' . $major_version . '.' . $minor_version . ($extras == 1 ? '; WOW64' : ($extras == 2 ? '; Win64; IA64' : ($extras == 3 ? '; Win64; x64' : ''))) . ')';

    }
629913
public function getUserAgent(): string
    {
        if (null === $this->cachedUserAgent) {
            $this->cachedUserAgent = $this->generate();
        }

        return $this->cachedUserAgent;
    }
915831
public function getDefaultAction()
    {
        // Determine the appliccable action
        if ( ! $this->default_action) {
            return null;
        }

        $actions = $this->default_action;

        if ( ! is_array($actions)) {
            $actions = [
                new ModelActionReferenceData([
                    'strategy' => $actions,
                ]),
            ];
        }

        $core = $this->getCore();


        foreach ($actions as $action) {

            $permissions = $action->permissions();

            if (    ! count($permissions)
                ||  $core->auth()->user()->isAdmin()
                ||  $core->auth()->user()->can($permissions)
            ) {
                return $action;
            }
        }

        return null;
    }