PageRenderTime 26ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/inc/patForms/Filter/Strtolower.php

https://github.com/chregu/fluxcms
PHP | 66 lines | 15 code | 3 blank | 48 comment | 0 complexity | 891ed372db1350395870699f613c356d MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, Apache-2.0, LGPL-2.1
  1. <?php
  2. /**
  3. * patForms strtolower filter
  4. *
  5. * Converts value to lowercase
  6. *
  7. * $Id$
  8. *
  9. * @package patForms
  10. * @subpackage Filter
  11. */
  12. /**
  13. * patForms strtolower filter
  14. *
  15. * Converts value to lowercase
  16. *
  17. * $Id$
  18. *
  19. * @package patForms
  20. * @subpackage Filter
  21. * @author Sebastian 'The Argh' Mordziol <argh@php-tools.net>
  22. * @license LGPL, see license.txt for details
  23. * @link http://www.php-tools.net
  24. * @version $Revision: 1.1 $
  25. */
  26. class patForms_Filter_Strtolower extends patForms_Filter
  27. {
  28. /**
  29. * type of the filter
  30. *
  31. * @access private
  32. */
  33. var $_type = PATFORMS_FILTER_TYPE_HTTP;
  34. /**
  35. * Filter value that is returned by patForms
  36. *
  37. * This method is applied when patForms_Element::getValue()
  38. * or patForms::getValues() is called.
  39. *
  40. * @abstract
  41. * @access public
  42. * @param string value
  43. * @return float filtered value
  44. */
  45. function out( $value )
  46. {
  47. return $value;
  48. }
  49. /**
  50. * Filter value that is passed to patForms
  51. *
  52. * @abstract
  53. * @access public
  54. * @param mixed value
  55. * @return mixed filtered value
  56. */
  57. function in( $value )
  58. {
  59. $value = strtolower( $value );
  60. return $value;
  61. }
  62. }
  63. ?>