| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <?php
- /* * ********************************************************************
- * ProxmoxVPS product developed. (2017-07-10)
- * *
- *
- * CREATED BY MODULESGARDEN -> http://modulesgarden.com
- * CONTACT -> contact@modulesgarden.com
- *
- *
- * This software is furnished under a license and may be used and copied
- * only in accordance with the terms of such license and with the
- * inclusion of the above copyright notice. This software or any other
- * copies thereof may not be provided or otherwise made available to any
- * other person. No title to and ownership of the software is hereby
- * transferred.
- *
- *
- * ******************************************************************** */
- namespace MGProvision\Proxmox\v2\models;
- /**
- * Description of Partition
- *
- * @author Pawel Kopec <pawelk@modulesgarden.com>
- * @version 1.0.0
- */
- class Partition
- {
- private $device;
- private $boot;
- private $start;
- private $end;
- private $blocks;
- private $sectors;
- private $size;
- private $id;
- private $system;
- private $type;
- private $number;
- public function setAttributes($attributes)
- {
- foreach ($attributes as $name => $attValue)
- {
- $methodName = 'set' . ucfirst($name);
- if (method_exists($this, $methodName))
- $this->{$methodName}($attValue);
- }
- }
- public function getDevice()
- {
- return $this->device;
- }
- public function getBoot()
- {
- return $this->boot;
- }
- public function getStart()
- {
- return $this->start;
- }
- public function getEnd()
- {
- return $this->end;
- }
- public function getBlocks()
- {
- return $this->blocks;
- }
- public function getId()
- {
- return $this->id;
- }
- public function getSystem()
- {
- return $this->system;
- }
- public function getNumber()
- {
- return $this->number;
- }
- public function setDevice($device)
- {
- $this->device = $device;
- return $this;
- }
- public function setBoot($boot)
- {
- $this->boot = $boot;
- return $this;
- }
- public function setStart($start)
- {
- $this->start = $start;
- return $this;
- }
- public function setEnd($end)
- {
- $this->end = $end;
- return $this;
- }
- public function setBlocks($blocks)
- {
- $this->blocks = $blocks;
- return $this;
- }
- public function setId($id)
- {
- $this->id = $id;
- return $this;
- }
- public function setSystem($system)
- {
- $this->system = $system;
- return $this;
- }
- public function setNumber($number)
- {
- $this->number = $number;
- return $this;
- }
- public function isBoot()
- {
- return preg_match('/\*/', $this->getBoot());
- }
- public function getType()
- {
- return $this->type;
- }
- public function setType($type)
- {
- $this->type = $type;
- return $this;
- }
- public function getSectors()
- {
- return $this->sectors;
- }
- public function getSize()
- {
- return $this->size;
- }
- public function setSectors($sectors)
- {
- $this->sectors = $sectors;
- return $this;
- }
- public function setSize($size)
- {
- $this->size = $size;
- return $this;
- }
- }
|