Piwik\Plugins\SitesManager\SitesManager::recordWebsiteDataInCache PHP Метод

recordWebsiteDataInCache() публичный Метод

Hooks when a website tracker cache is flushed (website updated, cache deleted, or empty cache) Will record in the tracker config file all data needed for this website in Tracker.
public recordWebsiteDataInCache ( array &$array, integer $idSite ) : void
$array array
$idSite integer
Результат void
    public function recordWebsiteDataInCache(&$array, $idSite)
    {
        $idSite = (int) $idSite;
        $urls = API::getInstance()->getSiteUrlsFromId($idSite);
        // add the 'hosts' entry in the website array
        $array['urls'] = $urls;
        $array['hosts'] = $this->getTrackerHosts($urls);
        $website = API::getInstance()->getSiteFromId($idSite);
        $array['exclude_unknown_urls'] = $website['exclude_unknown_urls'];
        $array['excluded_ips'] = $this->getTrackerExcludedIps($website);
        $array['excluded_parameters'] = self::getTrackerExcludedQueryParameters($website);
        $array['excluded_user_agents'] = self::getExcludedUserAgents($website);
        $array['keep_url_fragment'] = self::shouldKeepURLFragmentsFor($website);
        $array['sitesearch'] = $website['sitesearch'];
        $array['sitesearch_keyword_parameters'] = $this->getTrackerSearchKeywordParameters($website);
        $array['sitesearch_category_parameters'] = $this->getTrackerSearchCategoryParameters($website);
        $array['timezone'] = $this->getTimezoneFromWebsite($website);
        $array['ts_created'] = $website['ts_created'];
    }