Check site.

@return bool
359360
protected function checkSite()
    {
        $sites = $this->fetchSites(fp_env('ACACHA_FORGE_SERVER'));
        return in_array(fp_env('ACACHA_FORGE_SITE'), collect($sites)->pluck('id')->toArray());
    }
137340
public function checkBE()
	{
	    if ($this->isContao45()) 
	    {
	        if ($this->_BackendUser)
	        {
                ModuleVisitorLog::writeLog( __METHOD__ , __LINE__ , ': True' );
                return true;
	        }
	        ModuleVisitorLog::writeLog( __METHOD__ , __LINE__ , ': False' );
	        return false;
	    }
		//Contao <4.5.0
	    $strCookie = 'BE_USER_AUTH';
		$hash = sha1(session_id() . (!\Config::get('privacyAnonymizeIp') ? \Environment::get('ip') : '') . $strCookie);
		if (\Input::cookie($strCookie) == $hash)
		{
			// Try to find the session
			$objSession = \SessionModel::findByHashAndName($hash, $strCookie);
			// Validate the session ID and timeout
			if ($objSession !== null && $objSession->sessionID == session_id() && (\Config::get('privacyAnonymizeIp') || $objSession->ip == \Environment::get('ip')) && ($objSession->tstamp + $GLOBALS['TL_CONFIG']['sessionTimeout']) > time())
			{
			    ModuleVisitorLog::writeLog( __METHOD__ , __LINE__ , ': True' );
				return true;
			}
		}
		ModuleVisitorLog::writeLog( __METHOD__ , __LINE__ , ': False' );
		return false;
	}
1829
public function check()
    {
        foreach ($this->target->paths as $path) {
            if (! $this->getFilesystem()->isWritable($path)) {
                return $this->makeResult(
                    false,
                    sprintf($this->target->getErrorMessage(), $path)
                );
            }
        }

        return $this->makeHealthyResult();
    }
1333351
public function getSiteId()
    {
        if (is_null($this->siteId)) {
            $this->siteId = $this->getSite()['siteId'];
        }

        return $this->siteId;
    }
434466
public function check(): bool
    {
        return $this->installable = $this->items->filter(function ($specification) {
            return $specification->check() === false && $specification->optional() === false;
        })->isEmpty();
    }
489700
public function isCheckoutAllowed()
    {
        return $this->customerSession->isLoggedIn() || $this->checkoutHelper->isAllowedGuestCheckout($this->checkoutSession->getQuote());
    }
241173
public  function checkBeforeSend()
	{
		if ($this->ip != "unknown, unknown" && $this->botStop() && $this->checkBanIP($this->ip))
			return true;
		return false;
	}
34914
public function getSite()
    {
        $site = $this->owner->getComponent('Site');
        return ($site->ID) ? $site : Multisites::inst()->getCurrentSite();
    }
1109202
public function getSites()
    {
        $sites = [];
        $defaultSet = false;
        if (!$this->getValid()) {
            return $sites;
        }
        foreach ($this->xml->children() as $child) {
            if ($child->getName() == "site") {
                $site = $this->parseSite($child);
                if ($site !== false) {
                    if ($defaultSet && $site['default']) {
                        $this->logger->error('There can be only one default site.');
                    } else {
                        $sites[$site['url']] = $site;
                        $defaultSet |= $site['default'];
                    }
                }
            }
        }
        return $sites;
    }
53990
public function check()
    {
        $this->loadDatabase();

        $this->bootRouter();

        $isHealthy = ! $this->pingTimedout();

        $this->createPing();

        $this->dispatchEvent();

        return $this->makeResult($isHealthy, $this->target->getErrorMessage());
    }
1352168
public static function checkSecondDomain() {
        $domain = self::getSecondDomain();
        $domainConfig = Config::get('app.domain');
        if (isset($domainConfig[$domain])) {
            return $domainConfig[$domain];
        }
        return false;
    }
1201179
public function isValid()
	{
		return isset($this->path)
			|| isset($this->params)
			|| isset($this->anchor)
			|| isset($this->secure)
			|| isset($this->host)
			|| isset($this->port)
			|| isset($this->user)
			|| isset($this->pass);
	}
387592
public function isSection()
    {
        return $this->isCurrent() || (
            Director::get_current_page() instanceof SiteTree && in_array($this->ID, Director::get_current_page()->getAncestors()->column())
        );
    }
1078991
static function isNoCacheAdviced()
    {
        if ( !isset( $GLOBALS['eZSiteBasics'] ) )
            return false;
        $siteBasics = $GLOBALS['eZSiteBasics'];
        if ( !isset( $siteBasics['no-cache-adviced'] ) )
            return false;
        return $siteBasics['no-cache-adviced'];
    }
244932
public function check()
    {
        app('queue')->pushOn(
            $this->target->name,
            instantiate($this->target->testJob)
        );

        $worker = app('queue.worker');

        $connection = $this->target->connection
            ?: app('config')['queue.default'];

        $queue = app('config')->get(
            "queue.connections.{$connection}.queue",
            'default'
        );

        $worker->setCache(instantiate($this->target->cacheInstance)->driver());

        $worker->runNextJob($connection, $queue, $this->gatherWorkerOptions());

        return $this->makeResult(true);
    }
1089948
protected function checkBrowserOmniWeb()
    {
        if (stripos($this->_agent, 'omniweb') !== false) {
            $aresult = explode('/', stristr($this->_agent, 'omniweb'));
            $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : '');
            $this->setVersion($aversion[0]);
            $this->setBrowser(self::BROWSER_OMNIWEB);
            return true;
        }
        return false;
    }
1004353
public function stat_sites()
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $response = $this->exec_curl('/api/stat/sites');

        return $this->process_response($response);
    }