TasksProvider.php 556 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Crontab;
  7. /**
  8. * TasksProvider collects list of tasks
  9. */
  10. class TasksProvider implements TasksProviderInterface
  11. {
  12. /**
  13. * @var array
  14. */
  15. private $tasks = [];
  16. /**
  17. * @param array $tasks
  18. */
  19. public function __construct(array $tasks = [])
  20. {
  21. $this->tasks = $tasks;
  22. }
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public function getTasks()
  27. {
  28. return $this->tasks;
  29. }
  30. }