示例#1
0
 /**
  * {@inheritdoc}
  *
  **/
 public function make($value, $type, $decimals = 2, $symbol = true)
 {
     $type = strtoupper($type);
     $typedata = Type::getTypeData($type);
     $dec_point = $typedata['decimal_mark'];
     $thousands_sep = $typedata['thousand_marker'];
     $format = number_format($value, $decimals, $dec_point, $thousands_sep);
     $this->value = str_replace('{value}', $format, $typedata['format']);
     if ($symbol === false) {
         $this->value = str_replace($typedata['symbol'], '', $this->value);
     }
     return $this->value;
 }
示例#2
0
 /**
  * @expectedException \Hexcores\Currency\Exceptions\NotSupportedTypeException
  */
 public function testNotSupportedTypeException()
 {
     Type::getTypeData("RUH");
 }