Varien_Filter_Sprintf Class Reference

List of all members.

Public Member Functions

 __construct ($format, $decimals=null, $decPoint='.', $thousandsSep=',')
 filter ($value)

Protected Attributes

 $_format = null
 $_decimals = null
 $_decPoint = null
 $_thousandsSep = null


Detailed Description

Definition at line 28 of file Sprintf.php.


Constructor & Destructor Documentation

__construct ( format,
decimals = null,
decPoint = '.',
thousandsSep = ',' 
)

Definition at line 35 of file Sprintf.php.

00036     {
00037         $this->_format = $format;
00038         $this->_decimals = $decimals;
00039         $this->_decPoint = $decPoint;
00040         $this->_thousandsSep = $thousandsSep;
00041     }


Member Function Documentation

filter ( value  ) 

Definition at line 43 of file Sprintf.php.

00044     {
00045         if (!is_null($this->_decimals)) {
00046             $value = number_format($value, $this->_decimals, $this->_decPoint, $this->_thousandsSep);
00047         }
00048         $value = sprintf($this->_format, $value);
00049         return $value;
00050     }


Member Data Documentation

$_decimals = null [protected]

Definition at line 31 of file Sprintf.php.

$_decPoint = null [protected]

Definition at line 32 of file Sprintf.php.

$_format = null [protected]

Definition at line 30 of file Sprintf.php.

$_thousandsSep = null [protected]

Definition at line 33 of file Sprintf.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:25:02 2009 for Magento by  doxygen 1.5.8