Changeset 246

Show
Ignore:
Timestamp:
10/16/07 21:06:28 (9 months ago)
Author:
hans
Message:

#163 - Adding new stripwhitespace filter

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/classes/phing/filters/StripPhpComments.php

    r123 r246  
    3737 * @see       FilterReader 
    3838 * @package   phing.filters 
    39  * @todo -c use new PHP functions to perform this instead of regex. 
    4039 */ 
    4140class StripPhpComments extends BaseFilterReader implements ChainableReader { 
     
    172171 
    173172    /** 
    174      * Creates a new StripJavaComments using the passed in 
     173     * Creates a new StripPhpComments using the passed in 
    175174     * Reader for instantiation. 
    176175     *  
  • trunk/classes/phing/types/FilterChain.php

    r139 r246  
    3232include_once 'phing/filters/StripLineBreaks.php'; 
    3333include_once 'phing/filters/StripLineComments.php'; 
     34include_once 'phing/filters/StripWhitespace.php'; 
    3435include_once 'phing/filters/TabToSpaces.php'; 
    3536include_once 'phing/filters/TidyFilter.php'; 
     
    117118    } 
    118119     
     120        function addStripWhitespace(StripWhitespace $o) { 
     121        $o->setProject($this->project); 
     122        $this->filterReaders[] = $o; 
     123    } 
     124     
    119125        function addTidyFilter(TidyFilter $o) { 
    120126        $o->setProject($this->project); 
  • trunk/docs/phing_guide/book/chapters/appendixes/AppendixD-CoreTypes.html

    r182 r246  
    531531<h2><a name="StripPhpComments"></a>StripPhpComments</h2> 
    532532<p> 
    533 The <em>StripPhpComment</em> filter removes all PHP comments from 
     533The <em>StripPhpComments</em> filter removes all PHP comments from 
    534534the stream passed through the filter. 
    535535</p> 
     
    537537&lt;filterchain&gt; 
    538538  &lt;stripphpcomments /&gt; 
     539&lt;/filterchain&gt; 
     540</pre> 
     541 
     542<h2><a name="StripWhitespace"></a>StripWhitespace</h2> 
     543<p> 
     544The <em>StripWhitespace</em> filter removes all PHP comments and whitespace from 
     545the stream passed through the filter.  Internally, this filter uses the php_strip_whitespace() function. 
     546</p> 
     547<pre> 
     548&lt;filterchain&gt; 
     549  &lt;stripwhitespace /&gt; 
    539550&lt;/filterchain&gt; 
    540551</pre>