예제 #1
0
파일: forex.php 프로젝트: noccy80/lepton-ng
 public function convert($fv, $fc, $tc)
 {
     using('lepton.web.forex');
     $cc = new CurrencyExchange();
     $tv = $cc->convert($fv, $fc, $tc);
     console::writeLn("%0.2f %s = %0.2f %s", $fv, $fc, $tv, $tc);
 }
예제 #2
0
파일: forex.php 프로젝트: noccy80/lepton-ng
 /**
  * 
  * 
  * @param type $currency
  * @return type 
  */
 function convert($currency)
 {
     $cc = new CurrencyExchange();
     return new CurrencyAmount($cc->convert($this->amount, $this->symbol, $currency), $currency);
     // return sprintf('%s %.2f', $currency, $cc->convert($this->amount, $this->symbol, $currency));
 }