Ejemplo n.º 1
0
 public function formatCurrency($price)
 {
     if (is_array($price)) {
         $price = new Price($price[0], $price[1]);
     }
     $amount = $price->getAmount();
     $currency = $price->getCurrency();
     return $this->numberFormatter->formatCurrency($amount, $currency);
 }
Ejemplo n.º 2
0
 public function setPrice(Price $price)
 {
     $this->price = $price->getAmount();
     return $this;
 }