Arguments:489: return array_values($this->slaves);
490: }
491:
492: if ($this->updateSentinels) {
493: $this->updateSentinels();
494: }
495:
496: SENTINEL_QUERY: {
497: $sentinel = $this->getSentinelConnection();
498:
499: try {
500: $slavesParameters = $this->querySentinelForSlaves($sentinel, $this->service);
501:
502: foreach ($slavesParameters as $slaveParameters) {
503: $this->add($this->connectionFactory->create($slaveParameters));
Arguments:514:
515: /**
516: * Returns a random slave.
517: *
518: * @return NodeConnectionInterface|null
519: */
520: protected function pickSlave()
521: {
522: $slaves = $this->getSlaves();
523:
524: return $slaves
525: ? $slaves[rand(1, count($slaves)) - 1]
526: : null;
527: }
528:
Arguments:531: *
532: * @param CommandInterface $command Command instance.
533: *
534: * @return NodeConnectionInterface
535: */
536: private function getConnectionInternal(CommandInterface $command)
537: {
538: if (!$this->current) {
539: if ($this->strategy->isReadOperation($command) && $slave = $this->pickSlave()) {
540: $this->current = $slave;
541: } else {
542: $this->current = $this->getMaster();
543: }
544:
545: return $this->current;
Arguments:578: }
579: }
580:
581: /**
582: * {@inheritdoc}
583: */
584: public function getConnectionByCommand(CommandInterface $command)
585: {
586: $connection = $this->getConnectionInternal($command);
587:
588: if (!$connection->isConnected()) {
589: // When we do not have any available slave in the pool we can expect
590: // read-only operations to hit the master server.
591: $expectedRole = $this->strategy->isReadOperation($command) && $this->slaves ? 'slave' : 'master';
592: $this->assertConnectionRole($connection, $expectedRole);
object Predis\Command\Redis\HGET(1) {
private arguments => array(2) (
0 => string(20) "com:GeoLocationSites"
1 => string(2) "us"
)
}Arguments:710: * @return mixed
711: */
712: private function retryCommandOnFailure(CommandInterface $command, $method)
713: {
714: $retries = 0;
715:
716: while ($retries <= $this->retryLimit) {
717: try {
718: $response = $this->getConnectionByCommand($command)->$method($command);
719: break;
720: } catch (CommunicationException $exception) {
721: $this->wipeServerList();
722: $exception->getConnection()->disconnect();
723:
724: if ($retries === $this->retryLimit) {
Object Predis\Command\Redis\HGET, already rendered
Arguments:750: return $this->retryCommandOnFailure($command, __FUNCTION__);
751: }
752:
753: /**
754: * {@inheritdoc}
755: */
756: public function executeCommand(CommandInterface $command)
757: {
758: return $this->retryCommandOnFailure($command, __FUNCTION__);
759: }
760:
761: /**
762: * Returns the underlying replication strategy.
763: *
764: * @return ReplicationStrategy
Object Predis\Command\Redis\HGET, already rendered
string(14) "executeCommand"Arguments:373: throw new RuntimeException('Not allowed');
374: }
375:
376: /**
377: * {@inheritdoc}
378: */
379: public function executeCommand(CommandInterface $command)
380: {
381: $response = $this->connection->executeCommand($command);
382:
383: if ($response instanceof ResponseInterface) {
384: if ($response instanceof ErrorResponseInterface) {
385: $response = $this->onErrorResponse($command, $response);
386: }
387:
Object Predis\Command\Redis\HGET, already rendered
Arguments:327: return $response;
328: }
329:
330: /**
331: * {@inheritdoc}
332: */
333: public function __call($commandID, $arguments)
334: {
335: return $this->executeCommand(
336: $this->createCommand($commandID, $arguments)
337: );
338: }
339:
340: /**
341: * {@inheritdoc}
Object Predis\Command\Redis\HGET, already rendered
Arguments:226:
227: /**
228: * @param string $hashList Name of the $hashList to use.
229: * @param string $key Key of the $hashlist content to return.
230: */
231: public function hashGetKey($hashList, $key): ?string
232: {
233: $this->getConnection();
234: return $this->connection->hget($hashList, $key);
235: }
236:
237: /**
238: * @param string $hashList Name of the $hashList to use.
239: *
240: * @return array
string(4) "hget"array(2) ( 0 => string(20) "com:GeoLocationSites" 1 => string(2) "us" )
Arguments:45: /**
46: * return the site for the given country / language pair
47: *
48: * @param string $country the country
49: * @param string|null $language the language
50: */
51: public function getSite($country, ?string $language = NULL): ?string
52: {
53: return $this->redis->hashGetKey(
54: $this->hashlistSitesName,
55: $this->buildSiteKey($country, $language)
56: );
57: }
58:
59: /**
string(20) "com:GeoLocationSites"string(2) "us"Arguments:48: {
49: $langSite = $this->geoLocationRepo->getSite($country, $lang);
50: if (!is_null($langSite))
51: {
52: return $langSite;
53: }
54: }
55: }
56: $site = $this->geoLocationRepo->getSite($country);
57: if (!$site)
58: {
59: $site = $this->geoLocationRepo->getDefaultLanguage($country);
60: }
61: if (!$site)
62: {
string(2) "US"Arguments:83: );
84: continue;
85: }
86: if ($countrySelection->isFinal())
87: {
88: break;
89: }
90: }
91: return $this->siteMapping->getSite(
92: $countrySelection->getCountry(),
93: $countrySelection->getLanguages()
94: );
95: }
96: }
97:
string(2) "US"array(0) Arguments:41: {
42: if ($request->hasGet(GeoLocationMessageWorker::SWITCH_COUNTRY) || 'true' == $request->getGet(GeoLocationMessageWorker::SWITCH_COUNTRY))
43: {
44: return NULL;
45: }
46: // let the GeoLocation Module do it's magic.
47: try
48: {
49: return $this->geoLocator->execute($request);
50: }
51: catch (GeoLocationException)
52: {
53: return NULL;
54: }
55: }
object WASABI\Core\Request\Request(16) {
private data => array(6) (
"get" => object WASABI\Core\Request\RequestGet(2) {
protected data => array(0)
private staticUrlParams => array(0)
}
"post" => object WASABI\Core\Request\RequestPost(1) {
protected data => array(0)
}
"cookie" => object WASABI\Core\Request\RequestCookie(1) {
protected data => array(1) (
"rsWebFrontend" => string(32) "0aa0b9392b5373d03720a0d91d630ba0"
)
}
"files" => object WASABI\Core\Request\RequestFiles(1) {
protected data => array(0)
}
"server" => object WASABI\Core\Request\RequestServer(1) {
protected data => array(45) (
"USER" => string(6) "apache"
"HOME" => string(16) "/usr/share/httpd"
"SCRIPT_NAME" => string(10) "/index.php"
"REQUEST_URI" => string(86) "/lv/knowledge-center/knowledge-plus/focus-pages/defense-focus-page_255228-1111470.html"
"QUERY_STRING" => string(0) ""
"REQUEST_METHOD" => string(3) "GET"
"SERVER_PROTOCOL" => string(8) "HTTP/1.1"
"GATEWAY_INTERFACE" => string(7) "CGI/1.1"
"REMOTE_PORT" => string(5) "18903"
"SCRIPT_FILENAME" => string(22) "/srv/www/com/index.php"
"SERVER_ADMIN" => string(32) "it-servicedesk@rohde-schwarz.com"
"CONTEXT_DOCUMENT_ROOT" => string(12) "/srv/www/com"
"CONTEXT_PREFIX" => string(0) ""
"REQUEST_SCHEME" => string(4) "http"
"DOCUMENT_ROOT" => string(12) "/srv/www/com"
"REMOTE_ADDR" => string(12) "172.21.148.4"
"SERVER_PORT" => string(2) "80"
"SERVER_ADDR" => string(13) "172.21.148.71"
"SERVER_NAME" => string(21) "www.rohde-schwarz.com"
"SERVER_SOFTWARE" => string(6) "Apache"
"SERVER_SIGNATURE" => string(0) ""
"PATH" => string(49) "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
"HTTP_CONNECTION" => string(10) "Keep-Alive"
"HTTP_COOKIE" => string(46) "rsWebFrontend=0aa0b9392b5373d03720a0d91d630ba0"
"HTTP_X_FORWARDED_FOR" => string(13) "216.73.216.11"
"HTTP_RUSGEOLOCATION" => string(4) "VVMs"
"HTTP_ACCEPT_ENCODING" => string(23) "gzip, br, zstd, deflate"
"HTTP_USER_AGENT" => string(103) "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
"HTTP_ACCEPT" => string(3) "*/*"
"HTTP_HOST" => string(21) "www.rohde-schwarz.com"
"RS_DEBUG_MODE" => string(5) "false"
"RS_CONFIG" => string(4) "prod"
"RS_COM_HTTP_HOST" => string(21) "www.rohde-schwarz.com"
"SCRIPT_URI" => string(114) "http://www.rohde-schwarz.com/lv/knowledge-center/knowledge-plus/focus-pages/defense-focus-page_255228-1111470.html"
"SCRIPT_URL" => string(86) "/lv/knowledge-center/knowledge-plus/focus-pages/defense-focus-page_255228-1111470.html"
"UNIQUE_ID" => string(27) "aTPBZsjxrfaDbPbW8DyNagAAAIk"
"RS_SITE_CDN" => string(29) "https://cdn.rohde-schwarz.com"
"RS_COUNTRY_CODE" => string(1) "/"
"RS_SITE_PROTOCOL" => string(5) "https"
"RS_SITE" => string(3) "com"
"proxy" => string(1) "1"
"FCGI_ROLE" => string(9) "RESPONDER"
"PHP_SELF" => string(10) "/index.php"
"REQUEST_TIME_FLOAT" => float 1764999526.7102
"REQUEST_TIME" => integer 1764999526
)
}
"env" => object WASABI\Core\Request\RequestEnv(1) {
protected data => array(1) (
"RS_DEBUG_MODE" => bool TRUE
)
}
)
private locale => NULL
private urlEncoder => object WASABI\Core\System\UrlEncoder(0) {
}
private defaultSubSite => string(3) "com"
private requestURI => string(86) "/lv/knowledge-center/knowledge-plus/focus-pages/defense-focus-page_255228-1111470.html"
private urlParts => NULL
private cleanURI => NULL
private cleanUrlParts => NULL
private noShortUrl => array(4) (
0 => string(6) "driver"
1 => string(7) "drivers"
2 => string(8) "firmware"
3 => string(8) "software"
)
private reference => NULL
private product => string(0) ""
private productCode => string(0) ""
private geolocationRedirect => bool FALSE
private rawUrlQuery => string(0) ""
private userGeolocation => NULL
private isPreview => bool FALSE
}Arguments:56: $subSite = $this->config->getConfigValue('languages', 'defaultSubSite');
57: $request->setDefaultSubSite($subSite);
58: $this->siteMeta->setRequestedSubsite($subSite);
59: $this->siteMeta->setDefaultSubsite($subSite);
60: $availableSubsites = $this->config->getConfigValue('languages', 'subSiteLanguage');
61: $assumedGeosite = '';
62: if ($environment->getSite() !== 'com-stage')
63: {
64: $assumedGeosite = $this->factory->getInstanceFor(SiteGeoLocationActor::class)->getGeoLocationSubsite($request) ?? '';
65: }
66: $this->siteMeta->setAssumedGeosite($assumedGeosite);
67: /**
68: * @var SubsiteActor $subsiteActor
69: */
70: $subsiteActor = $this->factory->getInstanceFor(SubsiteActor::class);
Object WASABI\Core\Request\Request, already rendered
Arguments:47: {
48: $this->environment->setCurrentTime(strtotime((string)$this->request->getServer('HTTP_CURRENTTIME')));
49: }
50: }
51: /**
52: * @var SiteInitController $siteInitController
53: */
54: $siteInitController = $this->factory->getInstanceFor(SiteInitController::class);
55: $siteInitController->initSite($this->environment, $this->request);
56: $siteMetaInformation = $siteInitController->getSiteMetaInformation();
57: /** @var GeoLocationCookieController $cookieController */
58: $cookieController = $this->factory->getInstanceFor(GeoLocationCookieController::class);
59: $cookieController->handleGeoLocationCookie($this->request, $siteMetaInformation);
60:
61: /** @var GeoLocationMessageController $messageController */
object WASABI\Core\System\Environment(16) {
private site => string(3) "com"
private subSite => string(0) ""
private versionPrefix => NULL
private languageContentPath => NULL
private locale => NULL
private liveFolder => NULL
private localEnv => string(4) "prod"
private vHost => NULL
private globalVersion => NULL
private pageType => string(6) "domain"
private testDomain => bool FALSE
private currentTime => integer 1764999526
private assumedGeosite => string(0) ""
private mainSubsite => array(0)
private jobTimeConstraint => integer 0
private frontendVersion => string(0) ""
}Object WASABI\Core\Request\Request, already rendered
Arguments:106: {
107: $this->uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
108: $this->factory = $this->initializeFactory();
109: $this->config = $this->setupConfiguration();
110: $this->setRequest();
111: $this->logger = $this->factory->getInstanceFor(Logger::class, [$this->site, $this->request]);
112: $this->factory->setLogger($this->logger);
113: $this->setupErrorManager();
114: $this->buildEnvironment();
115: if ($this->config->getConfigValueWithDefaultValue('global', 'pageType', 'site') != 'site')
116: {
117: $this->config->addConfig(WASABI_BASEPATH . '/config/' . $this->environment->getSite() . '/' . $this->environment->getSubSite() . '/config.xml');
118: }
119: $this->localization();
120: $this->executeInitManager();
Arguments:29: * prepare webFrontend execution and run request
30: *
31: * @param Request|null $request object
32: *
33: * @return void
34: */
35: public function run(?Request $request = NULL): void
36: {
37: $this->init();
38: /** @var WebFrontDispatcher $frontDispatcher */
39: $frontDispatcher = $this->factory->getInstanceFor(WebFrontDispatcher::class);
40: $frontDispatcher->setLogger($this->logger);
41: $frontDispatcher->init();
42: /** @var WebFrontend $frontend */
43: $frontend = $this->factory->getInstanceFor(WebFrontend::class);
Arguments:14: $localConfig = getenv('RS_CONFIG');
15: $debug = getenv('RS_DEBUG_MODE');
16:
17: const WASABI_BASEPATH = '/opt/wasabi';
18:
19: require WASABI_BASEPATH . '/vendor/autoload.php';
20:
21: $bootstrap = new DomainBootstrap($site, $localConfig, $debug);
22: $bootstrap->run();
23: