| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?PHP 2 /** 3 * patTemplate StripWhitespace output filter 4 * 5 * $Id: StripWhitespace.php 10381 2008-06-01 03:35:53Z pasamio $ 6 * 7 * Will remove all whitespace and replace it with a single space. 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 StripWhitespace output filter 19 * 20 * $Id: StripWhitespace.php 10381 2008-06-01 03:35:53Z pasamio $ 21 * 22 * Will remove all whitespace and replace it with a single space. 23 * 24 * @package patTemplate 25 * @subpackage Filters 26 * @author Stephan Schmidt <schst@php.net> 27 */ 28 class patTemplate_OutputFilter_StripWhitespace extends patTemplate_OutputFilter 29 { 30 /** 31 * filter name 32 * 33 * @access protected 34 * @abstract 35 * @var string 36 */ 37 var $_name = 'StripWhitespace'; 38 39 /** 40 * remove all whitespace from the output 41 * 42 * @access public 43 * @param string data 44 * @return string data without whitespace 45 */ 46 function apply( $data ) 47 { 48 $data = str_replace( "\n", ' ', $data ); 49 $data = preg_replace( '/\s\s+/', ' ', $data ); 50 51 return $data; 52 } 53 } 54 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |