diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Archive.php | 2 | ||||
-rw-r--r-- | core/Cache.php | 16 | ||||
-rw-r--r-- | core/Common.php | 3 | ||||
-rw-r--r-- | core/Config/Cache.php | 2 | ||||
-rw-r--r-- | core/Config/IniFileChain.php | 6 | ||||
-rw-r--r-- | core/CronArchive/SegmentArchivingRequestUrlProvider.php | 4 | ||||
-rw-r--r-- | core/IP.php | 10 | ||||
-rw-r--r-- | core/Metrics.php | 2 | ||||
-rw-r--r-- | core/Plugin.php | 2 | ||||
-rw-r--r-- | core/Tracker/Cache.php | 4 | ||||
-rw-r--r-- | core/Tracker/Request.php | 4 | ||||
-rw-r--r-- | core/Tracker/TableLogAction/Cache.php | 4 | ||||
-rw-r--r-- | core/Tracker/Visit.php | 2 | ||||
-rw-r--r-- | core/Tracker/VisitExcluded.php | 2 | ||||
-rw-r--r-- | core/Translation/Loader/LoaderCache.php | 6 | ||||
-rw-r--r-- | core/Unzip.php | 10 | ||||
-rw-r--r-- | core/Url.php | 6 | ||||
-rw-r--r-- | core/Validators/IpRanges.php | 2 |
18 files changed, 43 insertions, 44 deletions
diff --git a/core/Archive.php b/core/Archive.php index e3e3ddf0b9..19b06db4a5 100644 --- a/core/Archive.php +++ b/core/Archive.php @@ -163,7 +163,7 @@ class Archive implements ArchiveQuery private $params; /** - * @var \Piwik\Cache\Cache + * @var \Matomo\Cache\Cache */ private static $cache; diff --git a/core/Cache.php b/core/Cache.php index dc6d87b8d8..2ced0cb23e 100644 --- a/core/Cache.php +++ b/core/Cache.php @@ -19,22 +19,22 @@ class Cache * an entry from the cache it will fetch the entry. Cache entries might be persisted but not necessarily. It * depends on the configured backend. * - * @return Cache\Lazy + * @return \Matomo\Cache\Lazy */ public static function getLazyCache() { - return StaticContainer::get('Piwik\Cache\Lazy'); + return StaticContainer::get('Matomo\Cache\Lazy'); } /** * This class is used to cache any data during one request. It won't be persisted between requests and it can * cache all kind of data, even objects or resources. This cache is very fast. * - * @return Cache\Transient + * @return \Matomo\Cache\Transient */ public static function getTransientCache() { - return StaticContainer::get('Piwik\Cache\Transient'); + return StaticContainer::get('Matomo\Cache\Transient'); } /** @@ -48,11 +48,11 @@ class Cache * All cache entries it contains have the same life time. For fast performance it won't validate any cache ids. * It is not possible to cache any objects using this cache. * - * @return Cache\Eager + * @return \Matomo\Cache\Eager */ public static function getEagerCache() { - return StaticContainer::get('Piwik\Cache\Eager'); + return StaticContainer::get('Matomo\Cache\Eager'); } public static function flushAll() @@ -64,11 +64,11 @@ class Cache /** * @param $type - * @return Cache\Backend + * @return \Matomo\Cache\Backend */ public static function buildBackend($type) { - $factory = new Cache\Backend\Factory(); + $factory = new \Matomo\Cache\Backend\Factory(); $options = self::getOptions($type); $backend = $factory->buildBackend($type, $options); diff --git a/core/Common.php b/core/Common.php index 295f2bfc40..11602fe11c 100644 --- a/core/Common.php +++ b/core/Common.php @@ -723,8 +723,7 @@ class Common */ public static function convertUserIdToVisitorIdBin($userId) { - require_once PIWIK_INCLUDE_PATH . '/libs/PiwikTracker/PiwikTracker.php'; - $userIdHashed = \PiwikTracker::getUserIdHashed($userId); + $userIdHashed = \MatomoTracker::getUserIdHashed($userId); return self::convertVisitorIdToBin($userIdHashed); } diff --git a/core/Config/Cache.php b/core/Config/Cache.php index 1538c65d94..c61d50c567 100644 --- a/core/Config/Cache.php +++ b/core/Config/Cache.php @@ -8,7 +8,7 @@ namespace Piwik\Config; -use Piwik\Cache\Backend\File; +use Matomo\Cache\Backend\File; use Piwik\Common; use Piwik\Piwik; use Piwik\Url; diff --git a/core/Config/IniFileChain.php b/core/Config/IniFileChain.php index a3ac25d746..7e064b0dad 100644 --- a/core/Config/IniFileChain.php +++ b/core/Config/IniFileChain.php @@ -8,9 +8,9 @@ namespace Piwik\Config; use Piwik\Common; -use Piwik\Ini\IniReader; -use Piwik\Ini\IniReadingException; -use Piwik\Ini\IniWriter; +use Matomo\Ini\IniReader; +use Matomo\Ini\IniReadingException; +use Matomo\Ini\IniWriter; use Piwik\Piwik; /** diff --git a/core/CronArchive/SegmentArchivingRequestUrlProvider.php b/core/CronArchive/SegmentArchivingRequestUrlProvider.php index d7863db58e..307f0c8547 100644 --- a/core/CronArchive/SegmentArchivingRequestUrlProvider.php +++ b/core/CronArchive/SegmentArchivingRequestUrlProvider.php @@ -7,8 +7,8 @@ */ namespace Piwik\CronArchive; -use Piwik\Cache\Cache; -use Piwik\Cache\Transient; +use Matomo\Cache\Cache; +use Matomo\Cache\Transient; use Piwik\Container\StaticContainer; use Piwik\Date; use Piwik\Period\Factory as PeriodFactory; diff --git a/core/IP.php b/core/IP.php index 6e6abfc693..2a86a9c3b0 100644 --- a/core/IP.php +++ b/core/IP.php @@ -9,7 +9,7 @@ namespace Piwik; -use Piwik\Network\IPUtils; +use Matomo\Network\IPUtils; /** * Contains IP address helper functions (for both IPv4 and IPv6). @@ -17,9 +17,9 @@ use Piwik\Network\IPUtils; * As of Piwik 2.9, most methods in this class are deprecated. You are * encouraged to use classes from the Piwik "Network" component: * - * @see \Piwik\Network\IP - * @see \Piwik\Network\IPUtils - * @link https://github.com/piwik/component-network + * @see \Matomo\Network\IP + * @see \Matomo\Network\IPUtils + * @link https://github.com/matomo-org/component-network * * As of Piwik 1.3, IP addresses are stored in the DB has VARBINARY(16), * and passed around in network address format which has the advantage of @@ -113,7 +113,7 @@ class IP if(empty($element)) { continue; } - $ip = \Piwik\Network\IP::fromStringIP(IPUtils::sanitizeIp($element)); + $ip = \Matomo\Network\IP::fromStringIP(IPUtils::sanitizeIp($element)); if (empty($excludedIps) || (!in_array($element, $excludedIps) && !$ip->isInRanges($excludedIps))) { return $element; } diff --git a/core/Metrics.php b/core/Metrics.php index 4649822a7b..7445ed4244 100644 --- a/core/Metrics.php +++ b/core/Metrics.php @@ -178,7 +178,7 @@ class Metrics public static function getMappingFromIdToName() { - $cache = StaticContainer::get(PiwikCache\Transient::class); + $cache = PiwikCache::getTransientCache(); $cacheKey = CacheId::siteAware(CacheId::pluginAware('Metrics.mappingFromIdToName')); $value = $cache->fetch($cacheKey); diff --git a/core/Plugin.php b/core/Plugin.php index 092c28b3cf..2d3cb5978e 100644 --- a/core/Plugin.php +++ b/core/Plugin.php @@ -107,7 +107,7 @@ class Plugin * perfect but efficient. If the cache is used we need to make sure to call setId() before usage as there * is maybe a different key set since last usage. * - * @var \Piwik\Cache\Eager + * @var \Matomo\Cache\Eager */ private $cache; diff --git a/core/Tracker/Cache.php b/core/Tracker/Cache.php index d1fde4aec6..c3928b83aa 100644 --- a/core/Tracker/Cache.php +++ b/core/Tracker/Cache.php @@ -28,12 +28,12 @@ class Cache /** * Public for tests only - * @var \Piwik\Cache\Lazy + * @var \Matomo\Cache\Lazy */ public static $cache; /** - * @return \Piwik\Cache\Lazy + * @return \Matomo\Cache\Lazy */ private static function getCache() { diff --git a/core/Tracker/Request.php b/core/Tracker/Request.php index 4054446a41..f33bed656d 100644 --- a/core/Tracker/Request.php +++ b/core/Tracker/Request.php @@ -16,7 +16,7 @@ use Piwik\Cookie; use Piwik\Exception\InvalidRequestParameterException; use Piwik\Exception\UnexpectedWebsiteFoundException; use Piwik\IP; -use Piwik\Network\IPUtils; +use Matomo\Network\IPUtils; use Piwik\Piwik; use Piwik\Plugins\CustomVariables\CustomVariables; use Piwik\Plugins\UsersManager\UsersManager; @@ -869,7 +869,7 @@ class Request } /** - * Matches implementation of PiwikTracker::getUserIdHashed + * Matches implementation of MatomoTracker::getUserIdHashed * * @param $userId * @return string diff --git a/core/Tracker/TableLogAction/Cache.php b/core/Tracker/TableLogAction/Cache.php index 32e132d76c..4cea0ed7c0 100644 --- a/core/Tracker/TableLogAction/Cache.php +++ b/core/Tracker/TableLogAction/Cache.php @@ -31,11 +31,11 @@ class Cache private $logger; /** - * @var \Piwik\Cache\Lazy + * @var \Matomo\Cache\Lazy */ private $cache; - public function __construct(LoggerInterface $logger, Config $config, \Piwik\Cache\Lazy $cache) + public function __construct(LoggerInterface $logger, Config $config, \Matomo\Cache\Lazy $cache) { $this->isEnabled = (bool)$config->General['enable_segments_subquery_cache']; $this->limitActionIds = $config->General['segments_subquery_cache_limit']; diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php index 9c76967adc..a425851285 100644 --- a/core/Tracker/Visit.php +++ b/core/Tracker/Visit.php @@ -15,7 +15,7 @@ use Piwik\Config; use Piwik\Container\StaticContainer; use Piwik\Date; use Piwik\Exception\UnexpectedWebsiteFoundException; -use Piwik\Network\IPUtils; +use Matomo\Network\IPUtils; use Piwik\Plugin\Dimension\VisitDimension; use Piwik\Plugins\UserCountry\Columns\Base; use Piwik\Tracker; diff --git a/core/Tracker/VisitExcluded.php b/core/Tracker/VisitExcluded.php index 838f0cf2a7..bc330b0996 100644 --- a/core/Tracker/VisitExcluded.php +++ b/core/Tracker/VisitExcluded.php @@ -13,7 +13,7 @@ use Piwik\Common; use Piwik\Container\StaticContainer; use Piwik\DeviceDetector\DeviceDetectorFactory; use Piwik\Exception\UnexpectedWebsiteFoundException; -use Piwik\Network\IP; +use Matomo\Network\IP; use Piwik\Piwik; use Piwik\Plugins\SitesManager\SiteUrls; use Piwik\Tracker\Visit\ReferrerSpamFilter; diff --git a/core/Translation/Loader/LoaderCache.php b/core/Translation/Loader/LoaderCache.php index 0726ef58f8..b84af80b6b 100644 --- a/core/Translation/Loader/LoaderCache.php +++ b/core/Translation/Loader/LoaderCache.php @@ -8,7 +8,7 @@ namespace Piwik\Translation\Loader; -use Piwik\Cache; +use Matomo\Cache\Lazy; /** * Caches the translations loaded by another loader. @@ -21,11 +21,11 @@ class LoaderCache implements LoaderInterface private $loader; /** - * @var Cache\Lazy + * @var Lazy */ private $cache; - public function __construct(LoaderInterface $loader, Cache\Lazy $cache) + public function __construct(LoaderInterface $loader, Lazy $cache) { $this->loader = $loader; $this->cache = $cache; diff --git a/core/Unzip.php b/core/Unzip.php index 4f43d1824f..80d648d6ed 100644 --- a/core/Unzip.php +++ b/core/Unzip.php @@ -8,10 +8,10 @@ namespace Piwik; -use Piwik\Decompress\Gzip; -use Piwik\Decompress\PclZip; -use Piwik\Decompress\Tar; -use Piwik\Decompress\ZipArchive; +use Matomo\Decompress\Gzip; +use Matomo\Decompress\PclZip; +use Matomo\Decompress\Tar; +use Matomo\Decompress\ZipArchive; /** * Factory for Decompress adapters. @@ -23,7 +23,7 @@ class Unzip * * @param string $name Name of unarchiver * @param string $filename Name of .zip archive - * @return \Piwik\Decompress\DecompressInterface + * @return \Matomo\Decompress\DecompressInterface */ public static function factory($name, $filename) { diff --git a/core/Url.php b/core/Url.php index 8d87f5e929..834d4c7062 100644 --- a/core/Url.php +++ b/core/Url.php @@ -9,7 +9,7 @@ namespace Piwik; use Exception; -use Piwik\Network\IPUtils; +use Matomo\Network\IPUtils; /** * Provides URL related helper methods. @@ -613,8 +613,8 @@ class Url */ public static function getHostSanitized($host) { - if (!class_exists("Piwik\\Network\\IPUtils")) { - throw new Exception("Piwik\\Network\\IPUtils could not be found, maybe you are using Matomo from git and need to update Composer. $ php composer.phar update"); + if (!class_exists("Matomo\\Network\\IPUtils")) { + throw new Exception("Matomo\\Network\\IPUtils could not be found, maybe you are using Matomo from git and need to update Composer. $ php composer.phar update"); } return IPUtils::sanitizeIp($host); } diff --git a/core/Validators/IpRanges.php b/core/Validators/IpRanges.php index 5e52f3751b..0bb6b7893c 100644 --- a/core/Validators/IpRanges.php +++ b/core/Validators/IpRanges.php @@ -9,7 +9,7 @@ namespace Piwik\Validators; -use Piwik\Network\IPUtils; +use Matomo\Network\IPUtils; use Piwik\Piwik; class IpRanges extends BaseValidator |