Geen omschrijving

CronWorkerInterface.php 868B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace MailPoet\Cron;
  3. if (!defined('ABSPATH')) exit;
  4. use MailPoet\Entities\ScheduledTaskEntity;
  5. use MailPoet\Models\ScheduledTask;
  6. interface CronWorkerInterface {
  7. /** @return string */
  8. public function getTaskType();
  9. /** @return bool */
  10. public function scheduleAutomatically();
  11. /** @return bool */
  12. public function supportsMultipleInstances();
  13. /** @return bool */
  14. public function checkProcessingRequirements();
  15. public function init();
  16. /**
  17. * @param ScheduledTaskEntity $task
  18. * @param float $timer
  19. * @return bool
  20. */
  21. public function prepareTaskStrategy(ScheduledTaskEntity $task, $timer);
  22. /**
  23. * @param ScheduledTask $task
  24. * @param float $timer
  25. * @return bool
  26. */
  27. public function processTaskStrategy(ScheduledTask $task, $timer);
  28. /** @return \DateTimeInterface */
  29. public function getNextRunDate();
  30. }