source/Core/ShopIdCalculator.php
protected function _getShopUrlMap()
    {
        //get from static cache
        if (isset(self::$urlMap)) {
            return self::$urlMap;
        }

        //get from file cache
        $aMap = $this->getVariablesCache()->getFromCache("urlMap");
        if (!is_null($aMap)) {
            self::$urlMap = $aMap;

            return $aMap;
        }

        $aMap = [];

        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sConfKey = $this->_getConfKey();

        $sSelect = "SELECT oxshopid, oxvarname, DECODE( oxvarvalue , " . $oDb->quote($sConfKey) . " ) as oxvarvalue " .
            "FROM oxconfig WHERE oxvarname in ('aLanguageURLs','sMallShopURL','sMallSSLShopURL')";

        // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
        $masterDb = \OxidEsales\Eshop\Core\DatabaseProvider::getMaster();
        $oRs = $masterDb->select($sSelect, false);

        if ($oRs && $oRs->count() > 0) {
            while (!$oRs->EOF) {
                $iShp = (int) $oRs->fields[0];
                $sVar = $oRs->fields[1];
                $sURL = $oRs->fields[2];

                if ($sVar == 'aLanguageURLs') {
                    $aUrls = unserialize($sURL);
                    if (is_array($aUrls) && count($aUrls)) {
                        $aUrls = array_filter($aUrls);
                        $aUrls = array_fill_keys($aUrls, $iShp);
                        $aMap = array_merge($aMap, $aUrls);
                    }
                } elseif ($sURL) {
                    $aMap[$sURL] = $iShp;
                }

                $oRs->fetchRow();
            }
        }

        //save to cache
        $this->getVariablesCache()->setToCache("urlMap", $aMap);
        self::$urlMap = $aMap;

        return $aMap;
    }
protected function _getShopUrlMap()
    {
        //get from static cache
        if (isset(self::$urlMap)) {
            return self::$urlMap;
        }

        //get from file cache
        $aMap = $this->getVariablesCache()->getFromCache("urlMap");
        if (!is_null($aMap)) {
            self::$urlMap = $aMap;

            return $aMap;
        }

        $aMap = [];

        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sConfKey = $this->_getConfKey();

        $sSelect = "SELECT oxshopid, oxvarname, DECODE( oxvarvalue , " . $oDb->quote($sConfKey) . " ) as oxvarvalue " .
            "FROM oxconfig WHERE oxvarname in ('aLanguageURLs','sMallShopURL','sMallSSLShopURL')";

        // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
        $masterDb = \OxidEsales\Eshop\Core\DatabaseProvider::getMaster();
        $oRs = $masterDb->select($sSelect, false);

        if ($oRs && $oRs->count() > 0) {
            while (!$oRs->EOF) {
                $iShp = (int) $oRs->fields[0];
                $sVar = $oRs->fields[1];
                $sURL = $oRs->fields[2];

                if ($sVar == 'aLanguageURLs') {
                    $aUrls = unserialize($sURL);
                    if (is_array($aUrls) && count($aUrls)) {
                        $aUrls = array_filter($aUrls);
                        $aUrls = array_fill_keys($aUrls, $iShp);
                        $aMap = array_merge($aMap, $aUrls);
                    }
                } elseif ($sURL) {
                    $aMap[$sURL] = $iShp;
                }

                $oRs->fetchRow();
            }
        }

        //save to cache
        $this->getVariablesCache()->setToCache("urlMap", $aMap);
        self::$urlMap = $aMap;

        return $aMap;
    }
protected function _getShopUrlMap ( ) { //get from static cache if ( isset ( self :: $ urlMap ) ) { return self :: $ urlMap ; } //get from file cache $ aMap = $ this -> getVariablesCache ( ) -> getFromCache ( "urlMap" ) ; if ( ! is_null ( $ aMap ) ) { self :: $ urlMap = $ aMap ; return $ aMap ; } $ aMap = [ ] ; $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sConfKey = $ this -> _getConfKey ( ) ; $ sSelect = "SELECT oxshopid, oxvarname, DECODE( oxvarvalue , " . $ oDb -> quote ( $ sConfKey ) . " ) as oxvarvalue " . "FROM oxconfig WHERE oxvarname in ('aLanguageURLs','sMallShopURL','sMallSSLShopURL')" ; // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804). $ masterDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getMaster ( ) ; $ oRs = $ masterDb -> select ( $ sSelect , false ) ; if ( $ oRs && $ oRs -> count ( ) > 0 ) { while ( ! $ oRs -> EOF ) { $ iShp = ( int ) $ oRs -> fields [ 0 ] ; $ sVar = $ oRs -> fields [ 1 ] ; $ sURL = $ oRs -> fields [ 2 ] ; if ( $ sVar == 'aLanguageURLs' ) { $ aUrls = unserialize ( $ sURL ) ; if ( is_array ( $ aUrls ) && count ( $ aUrls ) ) { $ aUrls = array_filter ( $ aUrls ) ; $ aUrls = array_fill_keys ( $ aUrls , $ iShp ) ; $ aMap = array_merge ( $ aMap , $ aUrls ) ; } } elseif ( $ sURL ) { $ aMap [ $ sURL ] = $ iShp ; } $ oRs -> fetchRow ( ) ; } } //save to cache $ this -> getVariablesCache ( ) -> setToCache ( "urlMap" , $ aMap ) ; self :: $ urlMap = $ aMap ; return $ aMap ; }
Returns shop url to id map from config.

@return array
Returns shop url to id map from config .