diff options
Diffstat (limited to 'core/ScheduledTask.php')
-rw-r--r-- | core/ScheduledTask.php | 9 |
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 |