QemuUpdateEvent.php 885 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace ModulesGarden\ProxmoxAddon\App\Events\Vps;
  3. use MGProvision\Proxmox\v2\interfaces\VmInterface;
  4. use ModulesGarden\ProxmoxAddon\Core\Events\Event;
  5. class QemuUpdateEvent extends Event
  6. {
  7. protected $vm;
  8. protected $changeVmPassword = true;
  9. public function __construct(VmInterface $vm)
  10. {
  11. $this->vm = $vm;
  12. }
  13. /**
  14. * @return VmInterface
  15. */
  16. public function getVm()
  17. {
  18. return $this->vm;
  19. }
  20. /**
  21. * @param VmInterface $vm
  22. */
  23. public function setVm($vm)
  24. {
  25. $this->vm = $vm;
  26. }
  27. /**
  28. * @return bool
  29. */
  30. public function isChangeVmPassword()
  31. {
  32. return $this->changeVmPassword;
  33. }
  34. /**
  35. * @param bool $changeVmPassword
  36. */
  37. public function setChangeVmPassword($changeVmPassword)
  38. {
  39. $this->changeVmPassword = $changeVmPassword;
  40. }
  41. }