NumericHelper.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. App::uses('NumberHelper', 'View/Helper');
  3. //App::uses('NumberLib', 'Tools.Utility');
  4. /**
  5. * Todo: rename to MyNumberHelper some day?
  6. * Aliasing it then as Number again in the project
  7. *
  8. * 2012-04-08 ms
  9. */
  10. class NumericHelper extends NumberHelper {
  11. //public $helpers = array();
  12. /*
  13. protected $_settings = array(
  14. );
  15. protected $code = null;
  16. protected $places = 0;
  17. protected $symbolRight = null;
  18. protected $symbolLeft = null;
  19. protected $decimalPoint = '.';
  20. protected $thousandsPoint = ',';
  21. */
  22. public function __construct($View = null, $settings = array()) {
  23. $settings = Set::merge(array('engine' => 'Tools.NumberLib'), $settings);
  24. parent::__construct($View, $settings);
  25. /*
  26. $i18n = Configure::read('Currency');
  27. if (!empty($i18n['code'])) {
  28. $this->code = $i18n['code'];
  29. }
  30. if (!empty($i18n['places'])) {
  31. $this->places = $i18n['places'];
  32. }
  33. if (!empty($i18n['symbolRight'])) {
  34. $this->symbolRight = $i18n['symbolRight'];
  35. }
  36. if (!empty($i18n['symbolLeft'])) {
  37. $this->symbolLeft = $i18n['symbolLeft'];
  38. }
  39. if (isset($i18n['decimals'])) {
  40. $this->decimalPoint = $i18n['decimals'];
  41. }
  42. if (isset($i18n['thousands'])) {
  43. $this->thousandsPoint = $i18n['thousands'];
  44. }
  45. */
  46. }
  47. }