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

Source for file HtmlEntities.php

Documentation is available at HtmlEntities.php

  1. <?php
  2. // +----------------------------------------------------------------------+
  3. // | PEAR :: I18Nv2 :: DecoratedList :: HtmlEntities                      |
  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: HtmlEntities.php,v 1.2 2004/04/29 15:33:06 mike Exp $
  15.  
  16. require_once 'I18Nv2/DecoratedList.php';
  17.  
  18. /**
  19. * I18Nv2_Decorator_HtmlEntities
  20. *
  21. @author       Michael Wallner <mike@php.net>
  22. @version      $Revision: 1.2 $
  23. @package      I18Nv2
  24. */
  25. {
  26.     /** 
  27.     * decorate
  28.     * 
  29.     * @access   protected
  30.     * @return   mixed 
  31.     * @param    mixed   $value 
  32.     */
  33.     function decorate($value)
  34.     {
  35.         if (is_string($value)) {
  36.             return htmlEntities($valueENT_QUOTES$this->list->getEncoding());
  37.         elseif (is_array($value)) {
  38.             return array_map(array(&$this'decorate')$value);
  39.         }
  40.         return $value;
  41.     }
  42. }
  43. ?>

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