Classes, interfaces and traits


Interface indicating that a reader may be chained to another one.

« More »


Base class for core filter readers.

« More »


Base class for core filter readers.

« More »


The class that holds a comment representation.

« More »


Concats a file before and/or after the file.

Example: ``` <copy todir="build"> <fileset dir="src" includes="*.php"/> <filterchain> <concatfilter prepend="license.txt"/> </filterchain> </copy> ``` Copies all php sources from `src` to `build` and adds the content of `license.txt` add the beginning of each file.
« More »


Holds a contains element.

« More »


UTF-8 to Unicode Code Points

This method converts non-latin characters to unicode escapes. Useful to load properties containing non latin. Example: `<escapeunicode>` Or: `<filterreader classname="phing.filters.EscapeUnicode"/>`
« More »


Expands Phing Properties, if any, in the data.

<p> Example:<br> <pre><expandproperties/></pre> Or: <pre><filterreader classname="phing.filters.ExpandProperties'/></pre>
« More »


Reads the first <code>n</code> lines of a stream.

(Default is first 10 lines.) <p> Example: <pre><headfilter lines="3"/></pre> Or: <pre><filterreader classname="phing.filters.HeadFilter"> <param name="lines" value="3"/> </filterreader></pre>
« More »


Encode data from <code>in</code> encoding to <code>out</code> encoding.

Example: <pre> <iconvfilter inputencoding="UTF-8" outputencoding="CP1251" /> </pre> Or: <pre> <filterreader classname="phing.filters.IconvFilter"> <param name="inputencoding" value="UTF-8" /> <param name="outputencoding" value="CP1251" /> </filterreader> </pre>
« More »


Filter which includes only those lines that contain all the user-specified strings.

Example: <pre><linecontains> <contains value="foo"> <contains value="bar"> </linecontains></pre> Or: <pre><filterreader classname="phing.filters.LineContains"> <param type="contains" value="foo"/> <param type="contains" value="bar"/> </filterreader></pre> This will include only those lines that contain <code>foo</code> and <code>bar</code>.
« More »


Filter which includes only those lines that contain the user-specified regular expression matching strings.

Example: <pre><linecontainsregexp> <regexp pattern="foo*"> </linecontainsregexp></pre> Or: <pre><filterreader classname="phing.filters.LineContainsRegExp"> <param type="regexp" value="foo*"/> </filterreader></pre> This will fetch all those lines that contain the pattern <code>foo</code>
« More »


Applies a native php function to the original input.

Example: <pre><phparraymaplines function="strtoupper"/></pre> Or: <pre><filterreader classname="phing.filters.PhpArrayMapLines"> <param name="function" value="strtoupper"/> </filterreader></pre>
« More »


Attaches a prefix to every line.

Example: <pre><prefixlines prefix="Foo"/></pre> Or: <pre><filterreader classname="phing.filters.PrefixLines"> <param name="prefix" value="Foo"/> </filterreader></pre>
« More »


Performs a regexp find/replace on stream.

<p> Example:<br> <pre> <replaceregexp> <regexp pattern="\r\n" replace="\n"/> <regexp pattern="(\w+)\.xml" replace="\1.php" ignoreCase="true"/> </replaceregexp> </pre>
« More »


Replaces tokens in the original input with user-supplied values.

Example: <pre><replacetokens begintoken="#" endtoken="#">; <token key="DATE" value="${TODAY}"/> </replacetokens></pre> Or: <pre><filterreader classname="phing.filters.ReplaceTokens"> <param type="tokenchar" name="begintoken" value="#"/> <param type="tokenchar" name="endtoken" value="#"/> <param type="token" name="DATE" value="${TODAY}"/> </filterreader></pre>
« More »


Replaces tokens in the original input with the contents of a file.

The file to be used is controlled by the name of the token which corresponds to the basename of the file to be used together with the optional pre and postfix strings that is possible to set. By default all HTML entities in the file is replaced by the corresponding HTML entities. This behaviour can be controlled by the "translatehtml" parameter. Supported parameters are: <pre> prefix string Text to be prefixed to token before using as filename postfix string Text to be prefixed to token before using as filename dir string The directory where the files should be read from translatehtml bool If we should translate all HTML entities in the file. </pre> Example: <pre><filterreader classname="phing.filters.ReplaceTokensWithFile"> <param name="dir" value="examples/" /> <param name="postfix" value=".php" /> </filterreader></pre>
« More »


<p> Sort a file before and/or after the file.

</p> <p> Examples: </p> <pre> &lt;copy todir=&quot;build&quot;&gt; &lt;fileset dir=&quot;input&quot; includes=&quot;*.txt&quot;/&gt; &lt;filterchain&gt; &lt;sortfilter/&gt; &lt;/filterchain&gt; &lt;/copy&gt; </pre> <p> Sort all files <code>*.txt</code> from <i>src</i> location and copy them into <i>build</i> location. The lines of each file are sorted in ascendant order comparing the lines. </p> <pre> &lt;copy todir=&quot;build&quot;&gt; &lt;fileset dir=&quot;input&quot; includes=&quot;*.txt&quot;/&gt; &lt;filterchain&gt; &lt;sortfilter reverse=&quot;true&quot;/&gt; &lt;/filterchain&gt; &lt;/copy&gt; </pre> <p> Sort all files <code>*.txt</code> from <i>src</i> location into reverse order and copy them into <i>build</i> location. If reverse parameter has value <code>true</code> (default value), then the output line of the files will be in ascendant order. </p>
« More »


Filter to flatten the stream to a single line.

Example: <pre><striplinebreaks/></pre> Or: <pre><filterreader classname="phing.filters.StripLineBreaks"/></pre>
« More »


This filter strips line comments.

Example: <pre><striplinecomments> <comment value="#"/> <comment value="--"/> <comment value="REM "/> <comment value="rem "/> <comment value="//"/> </striplinecomments></pre> Or: <pre><filterreader classname="phing.filters.StripLineComments"> <param type="comment" value="#"/> <param type="comment" value="--"/> <param type="comment" value="REM "/> <param type="comment" value="rem "/> <param type="comment" value="//"/> </filterreader></pre>
« More »


This is a Php comment and string stripper reader that filters those lexical tokens out for purposes of simple Php parsing.

(if you have more complex Php parsing needs, use a real lexer). Since this class heavily relies on the single char read function, you are recommended to make it work on top of a buffered reader.
« More »


Strips whitespace from [php] files using PHP stripwhitespace() method.

« More »


Attaches a suffix to every line.

Example: <pre><suffixlines suffix="Foo"/></pre> Or: <pre><filterreader classname="phing.filters.SuffixLines"> <param name="suffix" value="Foo"/> </filterreader></pre>
« More »


Converts tabs to spaces.

Example: <pre><tabtospaces tablength="8"></pre> Or: <pre><filterreader classname="phing.filters.TabsToSpaces"> <param name="tablength" value="8"> </filterreader></pre>
« More »


Reads the last <code>n</code> lines of a stream. (Default is last10 lines.)

Example: <pre><tailfilter lines="3" /></pre> Or: <pre><filterreader classname="phing.filters.TailFilter"> <param name="lines" value="3"> </filterreader></pre>
« More »


This filter uses the bundled-with-PHP Tidy extension to filter input.

<p> Example:<br/> <pre> <tidyfilter encoding="utf8"> <config name="indent" value="true"/> <config name="output-xhtml" value="true"/> </tidyfilter> </pre>
« More »


Holds a token.

« More »


Replaces gettext("message id") and _("message id") with the translated string.

Gettext is great for creating multi-lingual sites, but in some cases (e.g. for performance reasons) you may wish to replace the gettext calls with the translations of the strings; that's what this task is for. Note that this is similar to ReplaceTokens, but both the find and the replace aspect is more complicated -- hence this is a separate, stand-alone filter. <p> Example:<br> <pre> <translategettext locale="en_US" domain="messages" dir="${webroot}/local"/> </pre>
« More »


Applies Xinclude parsing to incoming text.

Uses PHP DOM XML support
« More »


Applies XSL stylesheet to incoming text.

Uses PHP XSLT support (libxslt).
« More »


Class that holds an XSLT parameter.

« More »