AbstractCronController.php 766 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace ModulesGarden\Servers\KerioEmail\Core\CommandLine;
  3. /**
  4. * Description of AbstractCronController
  5. *
  6. * @author Rafał
  7. */
  8. if (class_exists(\Thread::class))
  9. {
  10. class AbstractCronController extends \Thread
  11. {
  12. protected $className;
  13. protected $cronManager;
  14. public function setCronManager($cronManager)
  15. {
  16. $this->cronManager = $cronManager;
  17. return $this;
  18. }
  19. public function setClassName($className)
  20. {
  21. $this->className = $className;
  22. return $this;
  23. }
  24. protected function updatePid()
  25. {
  26. CronManager::updatePids($this->className);
  27. }
  28. }
  29. }
  30. else
  31. {
  32. class AbstractCronController
  33. {
  34. }
  35. }