Sets the current site.

From eZ Publish.

@param string $site Eg. 'plain_site_user'
@todo remove or move in another class?
482285
public function setCurrentSite( $site )
    {
        eZWebDAVContentBackend::appendLogEntry( __FUNCTION__ . '1:' . $site );
        $access = array( 'name' => $site,
                         'type' => eZSiteAccess::TYPE_STATIC );

        $access = eZSiteAccess::change( $access );
        eZWebDAVContentBackend::appendLogEntry( __FUNCTION__ . '2:' . $site );

        eZDebugSetting::writeDebug( 'kernel-siteaccess', $access, 'current siteaccess' );

        // Clear/flush global database instance.
        $nullVar = null;
        eZDB::setInstance( $nullVar );
    }
950969
private void siteSelected(String site) {
		if (!site.equals(currentSite)) {
			this.sessionsModel = extension.getHttpSessionsSite(site).getModel();
			this.getHttpSessionsTable().setModel(this.sessionsModel);

			this.setSessionsTableColumnSizes();

			currentSite = site;
		}
	}
279556
public function setTemplate($template)
    {
        $updateTemplateStm = $this->connection->prepare("UPDATE Page SET template = :template WHERE page_id = :page_id");
        $updateTemplateStm->bindParam(":template", $this->template);
        $updateTemplateStm->bindParam(":page_id", $this->page_id);
        $this->template = $template;
        $updateTemplateStm->execute();
    }
155039
private function SiteHostCondition(Site $site)
    {
        $siteUrl = $site->GetUrl();
        $host = parse_url($siteUrl, PHP_URL_HOST);
        return new RewriteCondition(new Variable(ServerVariable::HttpHost()), $host);
    }
682676
public function setConsumerHost($host)
    {
        $host = rtrim($host, '/');
        $this->_settings->spReturnUrl = $host . Maestrano::with($this->_preset)->param('sso.consume_path');
    }
1048782
public function setCurrentPage($page)
  {
    $this->currentPage = $page;
    $this->forcedPage = true;
    $this->updateTable();
  }
65860
public function setSiteConfig($siteConfig)
    {
        $siteConfig = $siteConfig === null ? FoxyStripeSetting::current_foxystripe_setting() : $siteConfig;
        if ($siteConfig instanceof FoxyStripeSetting) {
            $this->site_config = $siteConfig;

            return $this;
        }
        throw new \InvalidArgumentException('$siteConfig needs to be an instance of FoxyStripeSetting.');
    }
76700
private function _set_account( FS_User $user, FS_Site $site, $plans = false ) {
            $site->user_id = $user->id;

            $this->_site = $site;
            $this->_user = $user;
            if ( false !== $plans ) {
                $this->_plans = $plans;
            }

            $this->send_install_update();

            $this->_store_account();

        }
668154
public function setWebsite($website)
	{
		$pattern = '#^([a-z]+://)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)+(:[0-9]+)?(/.*)?$#';

		if( $website !== '' && preg_match( $pattern, $website ) !== 1 ) {
			throw new \Exception( sprintf( 'Invalid web site URL "%1$s"', $website ) );
		}

		$this->website = (string) $website;
	}
842335
static function LoadInstalledToFrontend(Site $site)
    {
        $bundles = InstalledBundle::Schema()->Fetch();
        foreach ($bundles as $bundle)
        {
            $manifest = ClassFinder::Manifest($bundle->GetBundle());
            $manifest->LoadToFrontend($site);
        }
    }
1328893
public void setSite(String v) {
    if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_site == null)
      jcasType.jcas.throwFeatMissing("site", "ch.epfl.bbp.uima.genia.Event");
    jcasType.ll_cas.ll_setStringValue(addr, ((Event_Type)jcasType).casFeatCode_site, v);}
1176972
protected function CanEdit(Site $site)
    {
        return self::Guard()->Allow(BackendAction::Edit(), $site) && 
                self::Guard()->Allow(BackendAction::UseIt(), new SiteForm());
    }
193358
public function setCurrentSite($siteId, $siteName, $siteDefaultLanguage, array $languages)
    {
        parent::setSite($siteId, $siteName, $siteDefaultLanguage, $languages);
    }
1373695
public function setSiteAccess(SiteAccess $siteAccess = null)
    {
        if ($this->logger) {
            $this->logger->debug('Changing SiteAccess in view providers');
        }

        $providers = array_merge(
            $this->getAllLocationViewProviders(),
            $this->getAllContentViewProviders(),
            $this->getAllBlockViewProviders()
        );
        foreach ($providers as $provider) {
            if ($provider instanceof SiteAccessAware) {
                $provider->setSiteAccess($siteAccess);
            }
        }
    }
192297
public function setDomain( $domain )
	{
		if ( $domain == $this->getDomain() ) { return; }

		$this->_values['domain'] = (string) $domain;
		$this->setModified();
	}
925372
public function setSiteRoot($url)
    {
        $url = strval($url);
        if ('' !== $url)
        {
            $url = rtrim(parse_url($url, PHP_URL_PATH), '/');
            if (substr($url, 0, 1) != '/')
            {
                $url = '/' . $url;
            }
        }
        $this->siteRoot = $url;
    }
433542
protected function setBaseUrl($site): self
    {
        $this->baseUrl = sprintf($this->baseUrl, $site, self::VERSION);

        return $this;
    }