PageRenderTime 51ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 0ms

/Sculpture/Packages/MVC/View/Filter/RTrim.php

https://bitbucket.org/richard_downes/sculpture
PHP | 61 lines | 10 code | 18 blank | 33 comment | 0 complexity | 58c94426bf2716a6da4c93acf558c2ed MD5 | raw file
  1. <?php
  2. namespace MVC\View\Filter;
  3. /*
  4. * Copyright 2011 Richard Downes
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. use MVC\View\IFilter;
  19. /**
  20. * Contains View\Filter\RTrim class
  21. *
  22. * @author Richard Downes <richard@sculpt.ie>
  23. * @copyright Copyright (c) 2011, Richard Downes
  24. * @package View.Filter
  25. */
  26. /**
  27. * Responsible for filtering the input by trimming whitespace from the right
  28. *
  29. * @author Richard Downes <richard@sculpt.ie>
  30. */
  31. class RTrim implements IFilter
  32. {
  33. /**
  34. * Filters the input by trimming whitespace from the right
  35. *
  36. * @param string $value The value to filter
  37. * @return string
  38. */
  39. public function filter($value)
  40. {
  41. return rtrim($value);
  42. }
  43. }