diff options
Diffstat (limited to 'core/Site.php')
-rw-r--r-- | core/Site.php | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/core/Site.php b/core/Site.php index d692c470ae..d5915e30b3 100644 --- a/core/Site.php +++ b/core/Site.php @@ -25,13 +25,19 @@ class Piwik_Site $this->id = $idsite; if(!isset(self::$infoSites[$this->id])) { - self::$infoSites[$this->id] = Piwik_SitesManager_API::getSiteFromId($idsite); + self::$infoSites[$this->id] = Piwik_SitesManager_API::getInstance()->getSiteFromId($idsite); } } function __toString() { - return "site id=".$this->getId().", name=".$this->getName(); + return "site id=".$this->getId().", + name=".$this->getName() .", + url = ". $this->getMainUrl() .", + IPs excluded = ".$this->getExcludedIps().", + timezone = ".$this->getTimezone().", + currency = ".$this->getCurrency().", + creation date = ".$this->getCreationDate(); } function getName() @@ -54,6 +60,26 @@ class Piwik_Site $date = self::$infoSites[$this->id]['ts_created']; return Piwik_Date::factory($date); } + + function getTimezone() + { + return self::$infoSites[$this->id]['timezone']; + } + + function getCurrency() + { + return self::$infoSites[$this->id]['currency']; + } + + function getExcludedIps() + { + return self::$infoSites[$this->id]['excluded_ips']; + } + + function getExcludedQueryParameters() + { + return self::$infoSites[$this->id]['excluded_parameters']; + } /** * @param string comma separated idSite list @@ -70,4 +96,9 @@ class Piwik_Site } return $validIds; } + + static public function clearCache() + { + self::$infoSites = array(); + } } |