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/ScheduledTask.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/ScheduledTask.php')
-rw-r--r--core/ScheduledTask.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/ScheduledTask.php b/core/ScheduledTask.php
index 8d9c368c54..5262e7cbc3 100644
--- a/core/ScheduledTask.php
+++ b/core/ScheduledTask.php
@@ -66,7 +66,7 @@ class ScheduledTask
function __construct($_objectInstance, $_methodName, $_methodParameter, $_scheduledTime, $_priority = self::NORMAL_PRIORITY)
{
- $this->className = get_class($_objectInstance);
+ $this->className = $this->getClassNameFromInstance($_objectInstance);
if ($_priority < self::HIGHEST_PRIORITY || $_priority > self::LOWEST_PRIORITY) {
throw new Exception("Invalid priority for ScheduledTask '$this->className.$_methodName': $_priority");
@@ -79,6 +79,13 @@ class ScheduledTask
$this->priority = $_priority;
}
+ protected function getClassNameFromInstance($_objectInstance)
+ {
+ $namespaced = get_class($_objectInstance);
+ $class = explode('\\', $namespaced);
+ return end($class);
+ }
+
/**
* Return the object instance on which the method should be executed
* @return string