Config.php 648 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace MGProvision\Proxmox\v2\models;
  3. /**
  4. * Class Config
  5. * @package MGProvision\Proxmox\v2\models
  6. */
  7. class Config
  8. {
  9. /**
  10. * @var array
  11. */
  12. protected $net = [];
  13. public function __construct()
  14. {
  15. }
  16. /**
  17. * @param $network
  18. * @return $this
  19. */
  20. public function setNet($network)
  21. {
  22. $this->net = $network;
  23. return $this;
  24. }
  25. /**
  26. * @return array
  27. */
  28. public function toArray()
  29. {
  30. $output = [];
  31. foreach($this->net as $key => $net)
  32. {
  33. $output['net'.$key] = $net->asConfig();
  34. }
  35. return $output;
  36. }
  37. }