Support Joomla!

Packages

Package: patTemplate

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.
Source code for file /pattemplate/patTemplate/InputFilter/StripComments.php

Documentation is available at StripComments.php

  1. <?PHP
  2. /**
  3.  * patTemplate StripComments input filter
  4.  *
  5.  * $Id: StripComments.php 10381 2008-06-01 03:35:53Z pasamio $
  6.  *
  7.  * Will remove all HTML comments.
  8.  *
  9.  * @package        patTemplate
  10.  * @subpackage    Filters
  11.  * @author        Stephan Schmidt <schst@php.net>
  12.  */
  13.  
  14. // Check to ensure this file is within the rest of the framework
  15. defined('JPATH_BASE'or die();
  16.  
  17. /**
  18.  * patTemplate StripComments output filter
  19.  *
  20.  * $Id: StripComments.php 10381 2008-06-01 03:35:53Z pasamio $
  21.  *
  22.  * Will remove all HTML comments.
  23.  *
  24.  * @package        patTemplate
  25.  * @subpackage    Filters
  26.  * @author        Stephan Schmidt <schst@php.net>
  27.  */
  28. {
  29.     /**
  30.     * filter name
  31.     *
  32.     * @access    protected
  33.     * @abstract
  34.     * @var    string 
  35.     */
  36.     var    $_name    =    'StripComments';
  37.  
  38.     /**
  39.     * compress the data
  40.     *
  41.     * @access    public
  42.     * @param    string        data
  43.     * @return    string        data without whitespace
  44.     */
  45.     function apply$data )
  46.     {
  47.         $data preg_replace'�<!--.*-->�msU'''$data );
  48.         $data preg_replace'�/\*.*\*/�msU'''$data );
  49.  
  50.         return $data;
  51.     }
  52. }
  53. ?>

Documentation generated on Sat, 14 Nov 2009 11:20:56 +0000 by phpDocumentor 1.3.1