*/ class Bvb_Grid_Formatter_Currency implements Bvb_Grid_Formatter_Interface { protected $_locale = null; function __construct ($options = array()) { if ( Zend_Locale::isLocale($options) ) { $this->_locale = $options; } else if ( Zend_Registry::isRegistered('Zend_Locale') ) { $this->_locale = Zend_Registry::get('Zend_Locale'); } } function format ($value) { if ( $this->_locale === null || ! is_numeric($value) ) { return $value; } $currency = new Zend_Currency($this->_locale); return $currency->toCurrency($value); } }