From f03529ca85115f849c7c17860bf3dab784c6d1a4 Mon Sep 17 00:00:00 2001 From: Serghei Luchianenco Date: Wed, 18 Oct 2017 13:51:33 +0200 Subject: [PATCH] scientificSymbol property, getter and setter are added --- src/UnitConverter/Unit/AbstractUnit.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/UnitConverter/Unit/AbstractUnit.php b/src/UnitConverter/Unit/AbstractUnit.php index 2bdea57f..4048a2ec 100644 --- a/src/UnitConverter/Unit/AbstractUnit.php +++ b/src/UnitConverter/Unit/AbstractUnit.php @@ -50,6 +50,11 @@ abstract class AbstractUnit implements UnitInterface */ protected $units; + /** + * @var string The scientific symbol of the unit + */ + protected $scientificSymbol; + public function __construct () { $this->configure(); @@ -147,4 +152,15 @@ public function getBaseUnits () : float { return $this->getBase()->getUnits(); } + + public function getScientificSymbol () : string + { + return $this->scientificSymbol; + } + + public function setScientificSymbol (string $scientificSymbol) : UnitInterface + { + $this->scientificSymbol = $scientificSymbol; + return $this; + } }