DollarFormatter.php in Loft Data Grids 6.2
Same filename and directory in other branches
Namespace
AKlump\LoftDataGridsFile
vendor/aklump/loft_data_grids/src/AKlump/LoftDataGrids/DollarFormatter.phpView source
<?php
namespace AKlump\LoftDataGrids;
/**
* Represents a cell formatter.
*/
class DollarFormatter extends Formatter implements FormatterInterface {
public function get() {
$base = 1 * preg_replace('/[^\\d\\.]/', '', $this->data);
return (string) '$' . number_format($base, 2);
}
}
Classes
Name![]() |
Description |
---|---|
DollarFormatter | Represents a cell formatter. |