partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit da646be1fe8475fa47e3c151a69ed7216672addb
parent 1dc4dc2a7689c19a62951dcc0fd042353035f888
Author: Felicitus <felicitus@felicitus.org>
Date:   Mon, 22 Jun 2015 13:49:12 +0200

Added serialization groups for SiPrefixes and Units

Diffstat:
Msrc/PartKeepr/SiPrefixBundle/Entity/SiPrefix.php | 29+----------------------------
1 file changed, 1 insertion(+), 28 deletions(-)

diff --git a/src/PartKeepr/SiPrefixBundle/Entity/SiPrefix.php b/src/PartKeepr/SiPrefixBundle/Entity/SiPrefix.php @@ -23,19 +23,7 @@ class SiPrefix * @var integer * @Groups({"default"}) */ - private $id; - - /** - * Returns the ID of this object. - * - * @param none - * - * @return int The ID of this object - */ - public function getId() - { - return $this->id; - } + public $id; /** * The prefix name of the Si-Prefix (e.g. yotta, deca, deci, centi) @@ -173,19 +161,4 @@ class SiPrefix { return $value * pow($this->base, $this->exponent); } - - /** - * Serializes the object into an array format. - * - * @return array the object in serialized format. - */ - public function serialize() - { - return array( - "id" => $this->getId(), - "symbol" => $this->getSymbol(), - "prefix" => $this->getPrefix(), - "exponent" => $this->getExponent() - ); - } } \ No newline at end of file