PageRenderTime 48ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/template/smarty/plugins/modifier.number_format.php

https://bitbucket.org/cyberfox/cyberfox-php-framework
PHP | 31 lines | 6 code | 2 blank | 23 comment | 0 complexity | cfd7ef702edfd6a15a52ce03a45ea4cd MD5 | raw file
Possible License(s): LGPL-3.0
  1. <?php
  2. /**
  3. -----------------------------------------------------------------------------
  4. * Smarty number_format modifier plugin
  5. *
  6. * returns a formatted number as of php number_format
  7. *
  8. -----------------------------------------------------------------------------
  9. -----------------------------------------------------------------------------
  10. * @copyright (C) 2011 Cyberfox Software Solutions e.U.
  11. * @license GNU Lesser General Public License version 3 (LGPLv3)
  12. * @author Christian Graf <christian.graf@cyberfox.at>
  13. -----------------------------------------------------------------------------
  14. -----------------------------------------------------------------------------
  15. * @package Application
  16. * @subpackage
  17. * @category Template
  18. -----------------------------------------------------------------------------
  19. -----------------------------------------------------------------------------
  20. # @version $Id: modifier.number_format.php 86 2012-05-08 08:13:17Z cgraf $
  21. # @date $Date: 2012-05-08 10:13:17 +0200 (Di, 08 Mai 2012) $
  22. # @svnauthor $Author: cgraf $
  23. -----------------------------------------------------------------------------
  24. */
  25. function smarty_modifier_number_format($String, $Decimals = 0, $DecSeperator=',', $ThousSeperator = '.')
  26. {
  27. return number_format($String, $Decimals, $DecSeperator, $ThousSeperator);
  28. }
  29. ?>