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 * @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; } }