Download core/Scheduler/TaskLoader.php from Leon4gr45/matomo: direct link, hf CLI and curl.
- Browser
- Download file 831 Bytes
-
https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/core/Scheduler/TaskLoader.php
- Command line
-
hf download hf://spaces/Leon4gr45/matomo/core/Scheduler/TaskLoader.php
-
curl -L -o TaskLoader.php https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/core/Scheduler/TaskLoader.php
831 Bytes
| /** | |
| * Matomo - free/libre analytics platform | |
| * | |
| * @link https://matomo.org | |
| * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | |
| */ | |
| namespace Piwik\Scheduler; | |
| use Piwik\Container\StaticContainer; | |
| use Piwik\Plugin\Manager as PluginManager; | |
| /** | |
| * Loads scheduled tasks. | |
| */ | |
| class TaskLoader | |
| { | |
| /** | |
| * @return Task[] | |
| */ | |
| public function loadTasks() | |
| { | |
| $tasks = array(); | |
| $pluginTasks = PluginManager::getInstance()->findComponents('Tasks', 'Piwik\Plugin\Tasks'); | |
| foreach ($pluginTasks as $pluginTask) { | |
| $pluginTask = StaticContainer::get($pluginTask); | |
| $pluginTask->schedule(); | |
| foreach ($pluginTask->getScheduledTasks() as $task) { | |
| $tasks[] = $task; | |
| } | |
| } | |
| return $tasks; | |
| } | |
| } | |