public function getFormatted()
    {
        if ($this->getUnit() != "") {
            return $this->getValue() . " " . $this->getUnit();
        } else {
            return (string)$this->getValue();
        }
    }
public function getFormatted()
    {
        if ($this->getUnit() != "") {
            return $this->getValue() . " " . $this->getUnit();
        } else {
            return (string)$this->getValue();
        }
    }
public function getFormatted ( ) { if ( $ this -> getUnit ( ) != "" ) { return $ this -> getValue ( ) . " " . $ this -> getUnit ( ) ; } else { return ( string ) $ this -> getValue ( ) ; } }
Get the value as formatted string with unit.

@return string The value as formatted string with unit.

The unit is not included if it is empty.
Get the value as formatted string with unit .