Beispiel #1
0
 /**
  * Format value as string
  * @param bool $withUnit
  * @return string
  */
 public function string($withUnit = true)
 {
     if ($this->UnitSystem->isImperial()) {
         return $this->stringFeet($withUnit);
     }
     return $this->stringMeter($withUnit);
 }
Beispiel #2
0
 /**
  * Format distance as string
  * @param bool $withUnit [optional]
  * @param int $decimals [optional] number of decimals
  * @return string
  */
 public function string($withUnit = true, $decimals = false)
 {
     if ($this->UnitSystem->isImperial()) {
         return $this->stringMiles($withUnit, $decimals);
     }
     return $this->stringKilometer($withUnit, $decimals);
 }
Beispiel #3
0
 /**
  * Unit
  * @return string
  */
 public function unit()
 {
     if ($this->UnitSystem->isImperial()) {
         return PaceUnit::MILES_PER_H;
     }
     return PaceUnit::KM_PER_H;
 }