Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-08-02 17:59:33 +0400
committermattab <matthieu.aubry@gmail.com>2013-08-02 17:59:33 +0400
commita96ec40e983a8b64f4c25def541a519ff3670e6a (patch)
treebef2a5f7b1e9532dc96161334e23a553cdff7ea1 /core/Loader.php
parent61997f45e4c39360000e815c9e0853ae04e2f56f (diff)
Refs #4059 Converting dozens of plugins/* classes to use Namespaces, \Piwik\Plugins\*
Added namespaces to functions.php files in the five plugins that had one Work in progress
Diffstat (limited to 'core/Loader.php')
-rw-r--r--core/Loader.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/Loader.php b/core/Loader.php
index fc913112e9..927fbdc797 100644
--- a/core/Loader.php
+++ b/core/Loader.php
@@ -46,7 +46,13 @@ class Loader
return $class;
}
- $vendorPrefixToRemove = 'Piwik/';
+ $class = self::removePrefix($class, 'Piwik/');
+ $class = self::removePrefix($class, 'Plugins/');
+ return $class;
+ }
+
+ protected static function removePrefix($class, $vendorPrefixToRemove)
+ {
if (strpos($class, $vendorPrefixToRemove) === 0) {
return substr($class, strlen($vendorPrefixToRemove));
}