public function format($value, $params = null, $locale = null) {
		if ($locale === null) {
			$locale = 'en';
		}
		
		$formatter = $this->getFormatter($locale);
		
		if (isset($params['primary'])) {
			return $formatter->formatCurrency($value, $params['primary']);
		}

		if (isset($params['currency'])) {
			return $formatter->formatCurrency($value, $params['currency']);
		}
		
		trigger_error('The "currency" parameter was not specified');
		
		return $formatter->format($value);
	}
public function format($value, $params = null, $locale = null) {
		if ($locale === null) {
			$locale = 'en';
		}
		
		$formatter = $this->getFormatter($locale);
		
		if (isset($params['primary'])) {
			return $formatter->formatCurrency($value, $params['primary']);
		}

		if (isset($params['currency'])) {
			return $formatter->formatCurrency($value, $params['currency']);
		}
		
		trigger_error('The "currency" parameter was not specified');
		
		return $formatter->format($value);
	}
public function format ( $ value , $ params = null , $ locale = null ) { if ( $ locale === null ) { $ locale = 'en' ; } $ formatter = $ this -> getFormatter ( $ locale ) ; if ( isset ( $ params [ 'primary' ] ) ) { return $ formatter -> formatCurrency ( $ value , $ params [ 'primary' ] ) ; } if ( isset ( $ params [ 'currency' ] ) ) { return $ formatter -> formatCurrency ( $ value , $ params [ 'currency' ] ) ; } trigger_error ( 'The "currency" parameter was not specified' ) ; return $ formatter -> format ( $ value ) ; }
Format the currency

@param  int    $value
@param  array  $params
@param  string $locale
@return string
Format the currency