I18Nv2
[ class tree: I18Nv2 ] [ index: I18Nv2 ] [ all elements ]

Source for file HtmlSpecialchars.php

Documentation is available at HtmlSpecialchars.php

  1. <?php
  2. // +----------------------------------------------------------------------+
  3. // | PEAR :: I18Nv2 :: DecoratedList :: HtmlSpecialchars                  |
  4. // +----------------------------------------------------------------------+
  5. // | This source file is subject to version 3.0 of the PHP license,       |
  6. // | that is available at http://www.php.net/license/3_0.txt              |
  7. // | If you did not receive a copy of the PHP license and are unable      |
  8. // | to obtain it through the world-wide-web, please send a note to       |
  9. // | license@php.net so we can mail you a copy immediately.               |
  10. // +----------------------------------------------------------------------+
  11. // | Copyright (c) 2004 Michael Wallner <mike@iworks.at>                  |
  12. // +----------------------------------------------------------------------+
  13. //
  14. // $Id: HtmlSpecialchars.php,v 1.1 2004/05/05 10:22:22 mike Exp $
  15.  
  16. require_once 'I18Nv2/DecoratedList.php';
  17.  
  18. /**
  19. * I18Nv2_Decorator_HtmlSpecialchars
  20. * When you are going to serve XHTML as XML or XHTML+XML then you will get
  21. * problems while displaying umlauts etc. as their HTML entities.
  22. *
  23. @author       Michael Wallner <mike@php.net>
  24. @version      $Revision: 1.1 $
  25. @package      I18Nv2
  26. */
  27. {
  28.     /** 
  29.     * decorate
  30.     * 
  31.     * @access   protected
  32.     * @return   mixed 
  33.     * @param    mixed   $value 
  34.     */
  35.     function decorate($value)
  36.     {
  37.         if (is_string($value)) {
  38.             return htmlSpecialchars($valueENT_QUOTES
  39.                 $this->list->getEncoding());
  40.         elseif (is_array($value)) {
  41.             return array_map(array(&$this'decorate')$value);
  42.         }
  43.         return $value;
  44.     }
  45. }
  46. ?>

Documentation generated on Mon, 11 Mar 2019 13:54:50 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.