### Classes, interfaces and traits

# DocBlox_Parallel_Manager¶

Manager class for Parallel processes.

This class will manage the workers and make sure all processes are executed in parallel and not too many at the same time.
« More »

# DocBlox_Parallel_Worker¶

Class that represents the execution of a single task within a parallelized frame.

« More »

# DocBlox_Parallel_WorkerPipe¶

Class that represents a named pipe for a Worker.

This class manages the named pipe for a worker and is able to push and pull specific data to facilitate IPC (interprocess communication).
« More »

### Constants

# PHPUnit_MAIN_METHOD¶

« More »

# PHP_CLASSPATH¶

« More »

### Classes, interfaces and traits

# BuildListener¶

Interface for build listeners.

Classes that implement a listener must extend this class and (faux)implement all methods that are decleard as dummies below.
« More »

# BuildLogger¶

Interface for build loggers.

Build loggers are build listeners but with some additional functionality: - They can be configured with a log level (below which they will ignore messages) - They have error and output streams Classes that implement a listener must implement this interface.
« More »

# StreamRequiredBuildLogger¶

Interface for build loggers that require that out/err streams be set in order to function.

This is just an empty sub-interface to BuildLogger, but is used by Phing to throw graceful errors when classes like phing.listener.DefaultLogger are being used as -listener.
« More »

# SubBuildListener¶

Instances of classes that implement this interface can register to be also notified when things happened during a subbuild.

<p>A subbuild is a separate project instance created by the <code>&lt;phing&gt;</code> task family. These project instances will never fire the buildStarted and buildFinished events, but they will fire subBuildStarted/ and subBuildFinished. The main project instance - the one created by running Phing in the first place - will never invoke one of the methods of this interface.</p>
« More »

# TaskContainer¶

Abstract interface for objects which can contain tasks (targets) Used to check if a class can contain tasks (via instanceof)

« More »

# AbstractPropertySetterTask¶

The base class for all Tasks.

Use \Project#createTask to register a new Task.
« More »

# BuildEvent¶

Encapsulates a build specific event.

<p>We have three sources of events all handled by this class: <ul> <li>Project level events</li> <li>Target level events</li> <li>Task level events</li> </ul> <p> Events are all fired from the project class by creating an event object using this class and passing it to the listeners.
« More »

# BuildException¶

BuildException is for when things go wrong in a build execution.

« More »

# ConfigurationException¶

ConfigurationException is thrown by Phing during the configuration and setup phase of the project.

« More »

# Diagnostics¶

A little diagnostic helper that output some information that may help in support. It should quickly give correct information about the phing system.

« More »

# IntrospectionHelper¶

Helper class that collects the methods that a task or nested element holds to set attributes, create nested elements or hold PCDATA elements.

<ul> <li><strong>SMART-UP INLINE DOCS</strong></li> <li><strong>POLISH-UP THIS CLASS</strong></li> </ul>
« More »

# Phing¶

Entry point into Phing. This class handles the full lifecycle of a build -- from parsing & handling commandline arguments to assembling the project to shutting down and cleaning up in the end.

If you are invoking Phing from an external application, this is still the class to use. Your applicaiton can invoke the start() method, passing any commandline arguments or additional properties.
« More »

# PrintStream¶

« More »

# Project¶

The Phing project class. Represents a completely configured Phing project.

The class defines the project and all tasks/targets. It also contains methods to start a build as well as some properties and FileSystem abstraction.
« More »

# ProjectComponent¶

Abstract class providing properties and methods common to all the project components

« More »

# RuntimeConfigurable¶

Wrapper class that holds the attributes of a Task (or elements nested below that level) and takes care of configuring that element at runtime.

<strong>SMART-UP INLINE DOCS</strong>
« More »

# Target¶

The Target component. Carries all required target data. Implements the abstract class {@link TaskContainer}

« More »

# Task¶

The base class for all Tasks.

Use \Project#createTask to register a new Task.
« More »

# TaskAdapter¶

Use introspection to "adapt" an arbitrary ( not extending Task, but with similar patterns).

Use \Project#createTask to register a new Task.
« More »

# UnknownElement¶

Wrapper class that holds all information necessary to create a task that did not exist when Phing started.

<em> This has something to do with phing encountering an task XML element it is not aware of at start time. This is a situation where special steps need to be taken so that the element is then known.</em>
« More »

### Classes, interfaces and traits

# AnsiColorLogger¶

Uses ANSI Color Code Sequences to colorize messages sent to the console.

If used with the -logfile option, the output file will contain all the necessary escape codes to display the text in colorized mode when displayed in the console using applications like cat, more, etc. This is designed to work on terminals that support ANSI color codes. It works on XTerm, ETerm, Mindterm, etc. It also works on Win9x (with ANSI.SYS loaded.) NOTE: It doesn't work on WinNT's COMMAND.COM even with ANSI.SYS loaded. The default colors used for differentiating the message levels can be changed by editing the phing/listener/defaults.properties file. This file contains 5 key/value pairs: AnsiColorLogger.ERROR_COLOR=2;31 AnsiColorLogger.WARNING_COLOR=2;35 AnsiColorLogger.INFO_COLOR=2;36 AnsiColorLogger.VERBOSE_COLOR=2;32 AnsiColorLogger.DEBUG_COLOR=2;34 Another option is to pass a system variable named ant.logger.defaults, with value set to the path of the file that contains user defined Ansi Color Codes, to the <B>java</B> command using -D option. To change these colors use the following chart: <B>ANSI COLOR LOGGER CONFIGURATION</B> Format for AnsiColorLogger.*= Attribute;Foreground;Background Attribute is one of the following: 0 -> Reset All Attributes (return to normal mode) 1 -> Bright (Usually turns on BOLD) 2 -> Dim 3 -> Underline 5 -> link 7 -> Reverse 8 -> Hidden Foreground is one of the following: 30 -> Black 31 -> Red 32 -> Green 33 -> Yellow 34 -> Blue 35 -> Magenta 36 -> Cyan 37 -> White Background is one of the following: 40 -> Black 41 -> Red 42 -> Green 43 -> Yellow 44 -> Blue 45 -> Magenta 46 -> Cyan 47 -> White
« More »

# DefaultLogger¶

Writes a build event to the console.

Currently, it only writes which targets are being executed, and any messages that get logged.
« More »

# HtmlColorLogger¶

Uses CSS class that must be defined in the HTML page where the Phing output is displayed.

If used with the -logfile option, the output will contain the text wrapped in html <span> elements with those css classes. The default classes used for differentiating the message levels can be changed by editing the phing/listener/defaults.properties file. This file can contain 5 key/value pairs: HtmlColorLogger.ERROR_CLASS=_your_css_class_name_ HtmlColorLogger.WARNING_CLASS=_your_css_class_name_ HtmlColorLogger.INFO_CLASS=_your_css_class_name_ HtmlColorLogger.VERBOSE_CLASS=_your_css_class_name_ HtmlColorLogger.DEBUG_CLASS=_your_css_class_name_ This stems from the Ansi Color Logger done by Hans Lellelid:
« More »

# MailLogger¶

Uses PEAR Mail package to send the build log to one or more recipients.

Currently, it only writes which targets are being executed, and any messages that get logged.
« More »

# NoBannerLogger¶

Extends DefaultLogger to strip out empty targets.

Currently, it only writes which targets are being executed, and any messages that get logged.
« More »

# PearLogListener¶

Writes build messages to PEAR Log.

By default it will log to file in current directory w/ name 'phing.log'. You can customize this behavior by setting properties: - pear.log.type - pear.log.name - pear.log.ident (note that this class changes ident to project name) - pear.log.conf (note that array values are currently unsupported in Phing property files) <code> phing -f build.xml -logger phing.listener.PearLogger -Dpear.log.type=file -Dpear.log.name=/path/to/log.log </code>
« More »

# SilentLogger¶

A logger which logs nothing but build failure and what task might output.

Currently, it only writes which targets are being executed, and any messages that get logged.
« More »

# TargetLogger¶

Extends AnsiColorLogger to display times for each target

If used with the -logfile option, the output file will contain all the necessary escape codes to display the text in colorized mode when displayed in the console using applications like cat, more, etc. This is designed to work on terminals that support ANSI color codes. It works on XTerm, ETerm, Mindterm, etc. It also works on Win9x (with ANSI.SYS loaded.) NOTE: It doesn't work on WinNT's COMMAND.COM even with ANSI.SYS loaded. The default colors used for differentiating the message levels can be changed by editing the phing/listener/defaults.properties file. This file contains 5 key/value pairs: AnsiColorLogger.ERROR_COLOR=2;31 AnsiColorLogger.WARNING_COLOR=2;35 AnsiColorLogger.INFO_COLOR=2;36 AnsiColorLogger.VERBOSE_COLOR=2;32 AnsiColorLogger.DEBUG_COLOR=2;34 Another option is to pass a system variable named ant.logger.defaults, with value set to the path of the file that contains user defined Ansi Color Codes, to the <B>java</B> command using -D option. To change these colors use the following chart: <B>ANSI COLOR LOGGER CONFIGURATION</B> Format for AnsiColorLogger.*= Attribute;Foreground;Background Attribute is one of the following: 0 -> Reset All Attributes (return to normal mode) 1 -> Bright (Usually turns on BOLD) 2 -> Dim 3 -> Underline 5 -> link 7 -> Reverse 8 -> Hidden Foreground is one of the following: 30 -> Black 31 -> Red 32 -> Green 33 -> Yellow 34 -> Blue 35 -> Magenta 36 -> Cyan 37 -> White Background is one of the following: 40 -> Black 41 -> Red 42 -> Green 43 -> Yellow 44 -> Blue 45 -> Magenta 46 -> Cyan 47 -> White
« More »

# XmlLogger¶

Generates a file in the current directory with an XML description of what happened during a build.

The default filename is "log.xml", but this can be overridden with the property <code>XmlLogger.file</code>.
« More »

### Classes, interfaces and traits

# AdhocTask¶

Abstract class for creating adhoc Phing components in buildfile.

By itself this class can be used to declare a single class within your buildfile. You can then reference this class in any task that takes custom classes (selectors, mappers, filters, etc.) Subclasses exist for conveniently declaring and registering tasks and types.
« More »

# AdhocTaskdefTask¶

A class for creating adhoc tasks in build file.

<target name="test-adhoc"> <adhoc-task name="foo"><![CDATA[ class FooTest extends Task { private $bar; function setBar($bar) { $this->bar = $bar; } function main() { $this->log("In FooTest: " . $this->bar); } } ]]></adhoc-task> <foo bar="B.L.I.N.G"/> </target>
« More »

# AdhocTypedefTask¶

A class for creating adhoc datatypes in build file.

By itself this class can be used to declare a single class within your buildfile. You can then reference this class in any task that takes custom classes (selectors, mappers, filters, etc.) Subclasses exist for conveniently declaring and registering tasks and types.
« More »

# AppendTask¶

Appends text, contents of a file or set of files defined by a filelist to a destination file.

<code> <append text="And another thing\n" destfile="badthings.log"/> </code> OR <code> <append file="header.html" destfile="fullpage.html"/> <append file="body.html" destfile="fullpage.html"/> <append file="footer.html" destfile="fullpage.html"/> </code> OR <code> <append destfile="${process.outputfile}"> <filterchain> <xsltfilter style="${process.stylesheet}"> <param name="mode" expression="${process.xslt.mode}"/> <param name="file_name" expression="%{task.append.current_file.basename}"/> <!-- Example of using a RegisterSlot variable --> </xsltfilter> </filterchain> <filelist dir="book/" listfile="book/PhingGuide.book"/> </append> </code>
« More »

# ApplyTask¶

Executes a command on the (filtered) file list/set.

(Loosely based on the "Ant Apply" task - http://ant.apache.org/manual/Tasks/apply.html)
« More »

# AvailableTask¶

<available> task.

Note: implements condition interface (see condition/Condition.php)
« More »

# Basename¶

Task that changes the permissions on a file/directory.

Use \Project#createTask to register a new Task.
« More »

# CaseTask¶

"Inner" class for SwitchTask.

The sequential task has no attributes and does not support any nested elements apart from Ant tasks. Any valid Ant task may be embedded within the sequential task.
« More »

# ChmodTask¶

Task that changes the permissions on a file/directory.

Use \Project#createTask to register a new Task.
« More »

# ChownTask¶

Task that changes the permissions on a file/directory.

Use \Project#createTask to register a new Task.
« More »

# ConditionTask¶

<condition> task as a generalization of <available>

<p>This task supports boolean logic as well as pluggable conditions to decide, whether a property should be set.</p> <p>This task does not extend Task to take advantage of ConditionBase.</p>
« More »

# CopyTask¶

A phing copy task. Copies a file or directory to a new file or directory. Files are only copied if the source file is newer than the destination file, or when the destination file does not exist. It is possible to explictly overwrite existing files.

Use \Project#createTask to register a new Task.
« More »

# CreoleTask¶

Handles Creole configuration needed by SQL type tasks.

Use \Project#createTask to register a new Task.
« More »

# CvsPassTask¶

Adds an new entry to a CVS password file.

Use \Project#createTask to register a new Task.
« More »

# CvsTask¶

Task for performing CVS operations.

NOTE: This implementation has been moved here from Cvs.java with the addition of some accessors for extensibility. Another task can extend this with some customized output processing.
« More »

# DeleteTask¶

Deletes a file or directory, or set of files defined by a fileset.

Use \Project#createTask to register a new Task.
« More »

# DiagnosticsTask¶

This is a task that hands off work to the Diagnostics module.

It lets you run diagnostics in an IDE.
« More »

# Dirname¶

Determines the directory name of the specified file.

This task can accept the following attributes: <ul> <li>file <li>property </ul> Both <b>file</b> and <b>property</b> are required. <p> When this task executes, it will set the specified property to the value of the specified file up to, but not including, the last path element. If file is a file, the directory will be the current directory.
« More »

# EchoProperties¶

Displays all the current properties in the build. The output can be sent to a file if desired.

Attribute "destfile" defines a file to send the properties to. This can be processed as a standard property file later. Attribute "prefix" defines a prefix which is used to filter the properties only those properties starting with this prefix will be echoed. By default, the "failonerror" attribute is enabled. If an error occurs while writing the properties to a file, and this attribute is enabled, then a BuildException will be thrown. If disabled, then IO errors will be reported as a log statement, but no error will be thrown. Examples: <pre> &lt;echoproperties /&gt; </pre> Report the current properties to the log. <pre> &lt;echoproperties destfile="my.properties" /&gt; </pre> Report the current properties to the file "my.properties", and will fail the build if the file could not be created or written to. <pre> &lt;echoproperties destfile="my.properties" failonerror="false" prefix="phing" /&gt; </pre> Report all properties beginning with 'phing' to the file "my.properties", and will log a message if the file could not be created or written to, but will still allow the build to continue.
« More »

# EchoTask¶

Echos a message to the logging system or to a file

Use \Project#createTask to register a new Task.
« More »

# ElseIfTask¶

"Inner" class for IfTask.

This class has same basic structure as the IfTask, although of course it doesn't support <else> tags.
« More »

# ExecTask¶

Executes a command on the shell.

Use \Project#createTask to register a new Task.
« More »

# FailTask¶

Exits the active build, giving an additional message if available.

Use \Project#createTask to register a new Task.
« More »

# ForeachTask¶

<foreach> task

Task definition for the foreach task. This task takes a list with delimited values, and executes a target with set param. Usage: <foreach list="values" target="targ" param="name" delimiter="|" /> Attributes: list --> The list of values to process, with the delimiter character, indicated by the "delimiter" attribute, separating each value. target --> The target to call for each token, passing the token as the parameter with the name indicated by the "param" attribute. param --> The name of the parameter to pass the tokens in as to the target. delimiter --> The delimiter string that separates the values in the "list" parameter. The default is ",".
« More »

# FunctionParam¶

Supports the <param> nested tag for PhpTask.

« More »

# IfTask¶

Perform some tasks based on whether a given condition holds true or not.

<p>This task is heavily based on the Condition framework that can be found in Ant 1.4 and later, therefore it cannot be used in conjunction with versions of Ant prior to 1.4.</p> <p>This task doesn't have any attributes, the condition to test is specified by a nested element - see the documentation of your <code><condition&gt;</code> task (see <a href="http://jakarta.apache.org/ant/manual/CoreTasks/condition.html">the online documentation</a> for example) for a complete list of nested elements.</p> <p>Just like the <code><condition&gt;</code> task, only a single condition can be specified - you combine them using <code><and&gt;</code> or <code><or&gt;</code> conditions.</p> <p>In addition to the condition, you can specify three different child elements, <code><elseif&gt;</code>, <code><then&gt;</code> and <code><else&gt;</code>. All three subelements are optional. Both <code><then&gt;</code> and <code><else&gt;</code> must not be used more than once inside the if task. Both are containers for Ant tasks, just like Ant's <code><parallel&gt;</code> and <code><sequential&gt;</code> tasks - in fact they are implemented using the same class as Ant's <code><sequential&gt;</code> task.</p> The <code><elseif&gt;</code> behaves exactly like an <code><if&gt;</code> except that it cannot contain the <code><else&gt;</code> element inside of it. You may specify as may of these as you like, and the order they are specified is the order they are evaluated in. If the condition on the <code><if&gt;</code> is false, then the first <code><elseif&gt;</code> who's conditional evaluates to true will be executed. The <code><else&gt;</code> will be executed only if the <code><if&gt;</code> and all <code><elseif&gt;</code> conditions are false. <p>Use the following task to define the <code><if&gt;</code> task before you use it the first time:</p> <pre><code> &lt;taskdef name=&quot;if&quot; classname=&quot;net.sf.antcontrib.logic.IfTask&quot; /&gt; </code></pre> <h3>Crude Example</h3> <code> <if> <equals arg1="${foo}" arg2="bar" /> <then> <echo message="The value of property foo is bar" /> </then> <else> <echo message="The value of property foo is not bar" /> </else> </if> </code> <code> <if> <equals arg1="${foo}" arg2="bar" /&gt; <then> <echo message="The value of property foo is 'bar'" /> </then> <elseif> <equals arg1="${foo}" arg2="foo" /> <then> <echo message="The value of property foo is 'foo'" /> </then> </elseif> <else> <echo message="The value of property foo is not 'foo' or 'bar'" /> </else> </if> </code>
« More »

# ImportTask¶

Imports another build file into the current project.

Targets and properties of the imported file can be overrridden by targets and properties of the same name declared in the importing file. The imported file will have a new synthetic property of "phing.file.<projectname>" declared which gives the full path to the imported file. Additionally each target in the imported file will be declared twice: once with the normal name and once with "<projectname>." prepended. The "<projectname>.<targetname>" synthetic targets allow the importing file a mechanism to call the imported files targets as dependencies or via the <phing> or <phingcall> task mechanisms.
« More »

# IncludePathTask¶

Adds a normalized path to the PHP include_path.

This provides a way to alter the include_path without editing any global php.ini settings or PHP_CLASSPATH environment variable. <code> <includepath classpath="new/path/here"/> </code>
« More »

# InputTask¶

Reads input from the InputHandler.

Use \Project#createTask to register a new Task.
« More »

# MatchingTask¶

This is an abstract task that should be used by all those tasks that require to include or exclude files based on pattern matching.

This is very closely based on the ANT class of the same name.
« More »

# MkdirTask¶

Task to create a directory.

Use \Project#createTask to register a new Task.
« More »

# MoveTask¶

Moves a file or directory to a new file or directory.

By default, the destination file is overwritten if it already exists. When overwrite is turned off, then files are only moved if the source file is newer than the destination file, or when the destination file does not exist. Source files and directories are only deleted when the file or directory has been copied to the destination successfully.
« More »

# PDOTask¶

Handles PDO configuration needed by SQL type tasks.

Use \Project#createTask to register a new Task.
« More »

# PhingCallTask¶

Call another target in the same project.

<samp> <target name="foo"> <phingcall target="bar"> <property name="property1" value="aaaaa" /> <property name="foo" value="baz" /> </phingcall> </target> <target name="bar" depends="init"> <echo message="prop is ${property1} ${foo}" /> </target> </samp> This only works as expected if neither property1 nor foo are defined in the project itself.
« More »

# PhingReference¶

Helper class that implements the nested <reference> element of <phing> and <phingcall>.

« More »

# PhingTask¶

Task that invokes phing on another build file.

Use this task, for example, if you have nested buildfiles in your project. Unlike AntTask, PhingTask can even support filesets: <pre> <phing> <fileset dir="${srcdir}"> <include name="** /build.xml" /> <!-- space added after ** is there because of PHP comment syntax --> <exclude name="build.xml" /> </fileset> </phing> </pre>
« More »

# PhingVersion¶

An phing version condition/task.

Use \Project#createTask to register a new Task.
« More »

# PhpEvalTask¶

Executes PHP function or evaluates expression and sets return value to a property.

WARNING: This task can, of course, be abused with devastating effects. E.g. do not modify internal Phing classes unless you know what you are doing.
« More »

# PropertyPromptTask¶

Deprecated task that uses console to prompt user for property values.

This class is very slightly simpler than the InputTask, but lacks the ability to use a non-console input handler. You should, therefore, use InputTask. This class can serve as a reference, but will be removed in the future.
« More »

# PropertyTask¶

Task for setting properties in buildfiles.

Use \Project#createTask to register a new Task.
« More »

# RecorderEntry¶

This is a class that represents a recorder. This is the listener to the build process.

« More »

# RecorderTask¶

Adds a listener to the current build process that records the output to a file.

<p>Several recorders can exist at the same time. Each recorder is associated with a file. The filename is used as a unique identifier for the recorders. The first call to the recorder task with an unused filename will create a recorder (using the parameters provided) and add it to the listeners of the build. All subsequent calls to the recorder task using this filename will modify that recorders state (recording or not) or other properties (like logging level).</p> <p>Some technical issues: the file's print stream is flushed for &quot;finished&quot; events (buildFinished, targetFinished and taskFinished), and is closed on a buildFinished event.</p>
« More »

# ReflexiveTask¶

This task is for using filter chains to make changes to files and overwrite the original files.

This task was created to serve the need for "cleanup" tasks -- e.g. a ReplaceRegexp task or strip task being used to modify files and then overwrite the modified files. In many (most?) cases you probably should just use a copy task to preserve the original source files, but this task supports situations where there is no src vs. build directory, and modifying source files is actually desired. <code> <reflexive> <fileset dir="."> <include pattern="*.html"> </fileset> <filterchain> <replaceregexp> <regexp pattern="\n\r" replace="\n"/> </replaceregexp> </filterchain> </reflexive> </code>
« More »

# ReplaceRegexpTask¶

ReplaceRegExp is a directory based task for replacing the occurrence of a given regular expression with a substitution pattern in a selected file or set of files.

<code> <replaceregexp file="${src}/build.properties" match="OldProperty=(.*)" replace="NewProperty=\1" byline="true"/> </code>
« More »

# ResolvePathTask¶

Task for resolving relative paths and setting absolute path in property value.

This task was created to address a need for resolving absolute paths of files / directories. In many cases a relative directory (e.g. "./build") is specified, but it needs to be treated as an absolute path since other build files (e.g. in subdirs) should all be using the same path -- and not treating it as a relative path to their own directory. <code> <property name="relative_path" value="./dirname"/> <resolvepath propertyName="absolute_path" file="${relative_path}"/> <echo>Resolved [absolute] path: ${absolute_path}</echo> </code> TODO: - Possibly integrate this with PackageAsPath, for handling/resolving dot-path paths.
« More »

# SequentialTask¶

Sequential is a container task that contains other Phing Task objects.

The sequential task has no attributes and does not support any nested elements apart from Ant tasks. Any valid Ant task may be embedded within the sequential task.
« More »

# SwitchTask¶

Task definition for the phing task to switch on a particular value.

Task calling syntax: ``` <switch value="value" [caseinsensitive="true|false"] > <case value="val"> <property name="propname" value="propvalue" /> | <phingcall target="targetname" /> | any other tasks </case> [ <default> <property name="propname" value="propvalue" /> | <phingcall target="targetname" /> | any other tasks </default> ] </switch> ``` Attributes: value -> The value to switch on caseinsensitive -> Should we do case insensitive comparisons? (default is false) Subitems: case --> An individual case to consider, if the value that is being switched on matches to value attribute of the case, then the nested tasks will be executed. default --> The default case for when no match is found. Crude Example: ``` <switch value="${foo}"> <case value="bar"> <echo message="The value of property foo is bar" /> </case> <case value="baz"> <echo message="The value of property foo is baz" /> </case> <default> <echo message="The value of property foo is not sensible" /> </default> </switch> ```
« More »

# TaskdefTask¶

Register a task for use within a buildfile.

This is for registering your own tasks -- or any non-core Task -- for use within a buildfile. If you find that you are using a particular class frequently, you may want to edit the phing/tasks/defaults.properties file so that it is included by default. You may also want to submit it (if LGPL or compatible license) to be included in Phing distribution. <pre> <taskdef name="mytag" classname="path.to.MyHandlingClass"/> . . <mytag param1="val1" param2="val2"/> </pre> TODO: -- possibly refactor since this is almost the same as TypeDefTask (right now these are just too simple to really justify creating an abstract class)
« More »

# ThrowTask¶

Exits the active build, giving an additional message if available.

Use \Project#createTask to register a new Task.
« More »

# TouchTask¶

Touch a file and/or fileset(s); corresponds to the Unix touch command.

If the file to touch doesn't exist, an empty one is created.
« More »

# TryCatchTask¶

A wrapper task that lets you run tasks(s) when another set of tasks fails.

Inspired by [http://ant-contrib.sourceforge.net/tasks/tasks/trycatch.html](http://ant-contrib.sourceforge.net/tasks/tasks/trycatch.html)
« More »

# TstampCustomFormat¶

« More »

# TstampTask¶

Sets properties to the current time, or offsets from the current time.

The default properties are TSTAMP, DSTAMP and TODAY; Based on Ant's Tstamp task.
« More »

# TypedefTask¶

Register a datatype for use within a buildfile.

This is for registering your own datatypes for use within a buildfile. If you find that you are using a particular class frequently, you may want to edit the phing/types/defaults.properties file so that it is included by default. You may also want to submit it (if LGPL or compatible license) to be included in Phing distribution. <pre> <typedef name="mytype" classname="path.to.MyHandlingClass"/> . <sometask ...> <mytype param1="val1" param2="val2"/> </sometask> </pre> TODO: -- possibly refactor since this is almost the same as TaskDefTask (right now these are just too simple to really justify creating an abstract class)
« More »

# UpToDateTask¶

Sets the given property if the specified target has a timestamp greater than all of the source files.

Use \Project#createTask to register a new Task.
« More »

# WaitForTask¶

Based on Apache Ant Wait For:

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
« More »

# WarnTask¶

Simple task to echo a warning message (Project::MSG_WARN) to all output devices.

Use \Project#createTask to register a new Task.
« More »

# XsltTask¶

Implements an XSLT processing filter while copying files.

This is a shortcut for calling the <copy> task with the XSLTFilter used in the <filterchains> section.
« More »

### Classes, interfaces and traits

# Condition¶

Condition interface specification:

Each condition must implement a method applying to this prototye:
« More »

# AndCondition¶

<and> condition container.

Iterates over all conditions and returns false as soon as one evaluates to false.
« More »

# ConditionBase¶

Abstract baseclass for the <condition> task as well as several conditions - ensures that the types of conditions inside the task and the "container" conditions are in sync.

« More »

# ConditionEnumeration¶

"Inner" class for handling enumerations.

Uses build-in PHP5 iterator support.
« More »

# ContainsCondition¶

Is one string part of another string?

« More »

# EqualsCondition¶

A simple string comparator. Compares two strings for eqiality in a binary safe manner. Implements the condition interface specification.

« More »

# FilesMatch¶

Compares two files for equality based on size and content. Timestamps are not at all looked at.

« More »

# HasFreeSpaceCondition¶

Condition returns true if selected partition has the requested space, false otherwise.

« More »

# HttpCondition¶

Condition to wait for a HTTP request to succeed.

Attributes are: - url - the URL of the request. - errorsBeginAt - number at which errors begin at; default=400.
« More »

# IsFalseCondition¶

Condition that tests whether a given string evals to false.

« More »

# IsSetCondition¶

Condition that tests whether a given property has been set.

« More »

# IsTrueCondition¶

Condition that tests whether a given string evals to true.

« More »

# NotCondition¶

<not> condition.

Evaluates to true if the single condition nested into it is false and vice versa.
« More »

# OrCondition¶

<or> condition container.

Iterates over all conditions and returns true as soon as one evaluates to true.
« More »

# OsCondition¶

Condition that tests the OS type.

« More »

# ReferenceExistsCondition¶

Condition that tests whether a given reference exists.

« More »

# SocketCondition¶

<socket> condition container.

Tests for a (tcp) listener on a specified host and port
« More »

# VersionCompareCondition¶

Condition that compare versions

« More »

# XorCondition¶

The Xor condition type to exclusive or operations. This does not shortcut stuff.

« More »

### Classes, interfaces and traits

# AssignedVar¶

An "inner" class for holding assigned var values.

May be need to expand beyond name/value in the future.
« More »

# AutoloaderTask¶

The base class for all Tasks.

Use \Project#createTask to register a new Task.
« More »

# CapsuleTask¶

A phing task for generating output by using Capsule.

This is based on the interface to TexenTask from Apache's Velocity engine.
« More »

# ComposerTask¶

Composer Task Run composer straight from phing

Use \Project#createTask to register a new Task.
« More »

# ExportPropertiesTask¶

Saves currently defined properties into a specified file

Use \Project#createTask to register a new Task.
« More »

# ExtractBaseTask¶

Base class for extracting tasks such as Unzip and Untar.

This is very closely based on the ANT class of the same name.
« More »

# FileHashTask¶

fileHash

Calculate either MD5 or SHA hash value of a specified file and retun the value in a property
« More »

# FileSizeTask¶

fileHash

Calculate either MD5 or SHA hash value of a specified file and retun the value in a property
« More »

# FileSyncTask¶

The FileSyncTask class copies files either to or from a remote host, or locally on the current host. It allows rsync to transfer the differences between two sets of files across the network connection, using an efficient checksum-search algorithm.

There are 4 different ways of using FileSyncTask: 1. For copying local files. 2. For copying from the local machine to a remote machine using a remote shell program as the transport (ssh). 3. For copying from a remote machine to the local machine using a remote shell program. 4. For listing files on a remote machine. This is extended from Federico's original code, all his docs are kept in here below.
« More »

# FtpDeployTask¶

FtpDeployTask

Deploys a set of files to a remote FTP server. Example usage: <ftpdeploy host="host" port="21" username="user" password="password" dir="public_html" mode="ascii" clearfirst="true" depends="false" filemode="" dirmode=""> <fileset dir="."> <include name="**"/> <exclude name="phing"/> <exclude name="build.xml"/> <exclude name="images/**.png"/> <exclude name="images/**.gif"/> <exclude name="images/**.jpg"/> </fileset> </ftpdeploy>
« More »

# GrowlNotifyTask¶

Growl notification task for Phing, the PHP build tool.

PHP version 5
« More »

# HttpGetTask¶

A HTTP download task.

Downloads a file via HTTP GET method and saves it to a specified directory
« More »

# HttpRequestTask¶

A HTTP request task.

Making an HTTP request and try to match the response against an provided regular expression.
« More »

# HttpTask¶

Base class for HTTP_Request2-backed tasks

Handles nested <config /> and <header /> tags, contains a method for HTTP_Request2 instance creation
« More »

# JsHintTask¶

JsHintTask

Checks the JavaScript code using JSHint See http://www.jshint.com/
« More »

# JslLintTask¶

A Javascript lint task. Checks syntax of Javascript files.

Javascript lint (http://www.javascriptlint.com) must be in the system path. This class is based on Knut Urdalen's PhpLintTask.
« More »

# JsMinTask¶

Task to minify javascript files.

Requires JShrink (https://github.com/tedivm/JShrink) which can be installed using composer
« More »

# LoadFileTask¶

LoadFileTask

Loads a (text) file and stores the contents in a property. Supports filterchains.
« More »

# MailTask¶

Send an e-mail message

<mail tolist="user@example.org" subject="build complete">The build process is a success...</mail>
« More »

# ManifestTask¶

ManifestTask

Generates a simple Manifest file with optional checksums. Manifest schema: ... path/to/file CHECKSUM [CHECKSUM2] [CHECKSUM3] path/to/secondfile CHECKSUM [CHECKSUM2] [CHECKSUM3] ... Example usage: <manifest checksum="crc32" file="${dir_build}/Manifest"> <fileset refid="files_build" /> </manifest> <manifest checksum="md5,adler32,sha256" file="${dir_build}/Manifest"> <fileset refid="files_build" /> </manifest>
« More »

# PackageAsPathTask¶

Convert dot-notation packages to relative paths.

Use \Project#createTask to register a new Task.
« More »

# ParallelTask¶

Uses the DocBlox_Parallel library to run nested Phing tasks concurrently.

WARNING: this task is highly experimental!
« More »

# PatchTask¶

Patches a file by applying a 'diff' file to it

Requires "patch" to be on the execution path.
« More »

# PearPackage2Task¶

A task to create a PEAR package.xml version 2.0 file.

This class uses the PEAR_PackageFileManager2 class to perform the work. This class is designed to be very flexible -- i.e. account for changes to the package.xml w/o requiring changes to this class. We've accomplished this by having generic <option> and <mapping> nested elements. All options are set using PEAR_PackageFileManager2::setOptions(). The <option> tag is used to set a simple option value. <code> <option name="option_name" value="option_value"/> or <option name="option_name">option_value</option> </code> The <mapping> tag represents a complex data type. You can use nested <element> (and nested <element> with <element> tags) to represent the full complexity of the structure. Bear in mind that what you are creating will be mapped to an associative array that will be passed in via PEAR_PackageFileManager2::setOptions(). <code> <mapping name="option_name"> <element key="key_name" value="key_val"/> <element key="key_name" value="key_val"/> </mapping> </code> Here's an over-simple example of how this could be used: <code> <pearpkg2 name="phing" dir="${build.src.dir}"> <fileset dir="src"> <include name="**"/> </fileset> <option name="outputdirectory" value="./build"/> <option name="packagefile" value="package2.xml"/> <option name="packagedirectory" value="./${build.dist.dir}"/> <option name="baseinstalldir" value="${pkg.prefix}"/> <option name="channel" value="my.pear-channel.com"/> <option name="summary" value="${pkg.summary}"/> <option name="description" value="${pkg.description}"/> <option name="apiversion" value="${pkg.version}"/> <option name="apistability" value="beta"/> <option name="releaseversion" value="${pkg.version}"/> <option name="releasestability" value="beta"/> <option name="license" value="none"/> <option name="phpdep" value="5.0.0"/> <option name="pearinstallerdep" value="1.4.6"/> <option name="packagetype" value="php"/> <option name="notes" value="${pkg.relnotes}"/> <mapping name="maintainers"> <element> <element key="handle" value="hlellelid"/> <element key="name" value="Hans"/> <element key="email" value="hans@xmpl.org"/> <element key="role" value="lead"/> <element key="active" value="yes"/> </element> </mapping> </pearpkg2> </code> Look at the build.xml in the Phing base directory (assuming you have the full distro / CVS version of Phing) to see a more complete example of how to call this script.
« More »

# PearPackageTask¶

A task to create PEAR package.xml file.

This class uses the PEAR_PackageFileMaintainer class to perform the work. This class is designed to be very flexible -- i.e. account for changes to the package.xml w/o requiring changes to this class. We've accomplished this by having generic <option> and <mapping> nested elements. All options are set using PEAR_PackageFileMaintainer::setOptions(). The <option> tag is used to set a simple option value. <code> <option name="option_name" value="option_value"/> or <option name="option_name">option_value</option> </code> The <mapping> tag represents a complex data type. You can use nested <element> (and nested <element> with <element> tags) to represent the full complexity of the structure. Bear in mind that what you are creating will be mapped to an associative array that will be passed in via PEAR_PackageFileMaintainer::setOptions(). <code> <mapping name="option_name"> <element key="key_name" value="key_val"/> <element key="key_name" value="key_val"/> </mapping> </code> Here's an over-simple example of how this could be used: <code> <pearpkg name="phing" dir="${build.src.dir}" destFile="${build.base.dir}/package.xml"> <fileset> <include name="**"/> </fileset> <option name="notes">Sample release notes here.</option> <option name="description">Package description</option> <option name="summary">Short description</option> <option name="version" value="2.0.0b1"/> <option name="state" value="beta"/> <mapping name="maintainers"> <element> <element key="handle" value="hlellelid"/> <element key="name" value="Hans"/> <element key="email" value="hans@xmpl.org"/> <element key="role" value="lead"/> </element> </mapping> </pearpkg> </code> Look at the build.xml in the Phing base directory (assuming you have the full distro / CVS version of Phing) to see a more complete example of how to call this script.
« More »

# PearPkgMapping¶

Handles complex options <mapping> elements which are hashes (assoc arrays).

« More »

# PearPkgMappingElement¶

Sub-element of <mapping>.

« More »

# PearPkgOption¶

Generic option class is used for non-complex options.

« More »

# PearPkgRole¶

Encapsulates file roles

« More »

# PharDataTask¶

Data task for {@link http://php.net/manual/en/class.phardata.php PharData class}.

This is very closely based on the ANT class of the same name.
« More »

# PharPackageTask¶

Package task for {@link http://www.php.net/manual/en/book.phar.php Phar technology}.

This is very closely based on the ANT class of the same name.
« More »

# PhpCodeSnifferTask¶

A PHP code sniffer task. Checking the style of one or more PHP source files.

Use \Project#createTask to register a new Task.
« More »

# PhpCodeSnifferTask_FormatterElement¶

Base class for those classes that can appear inside the build file as stand alone data types.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# PhpCodeSnifferTask_Wrapper¶

Wrapper to disable PHPCS's destructor

« More »

# PhpLintTask¶

A PHP lint task. Checking syntax of one or more PHP source file.

Use \Project#createTask to register a new Task.
« More »

# rSTTask¶

reStructuredText rendering task for Phing, the PHP build tool.

PHP version 5
« More »

# S3GetTask¶

Downloads an object off S3

Provides common methods and properties to all of the S3 tasks
« More »

# S3PutTask¶

Stores an object on S3

Provides common methods and properties to all of the S3 tasks
« More »

# ScpTask¶

Copy files to and from a remote host using scp.

Use \Project#createTask to register a new Task.
« More »

# Service_Amazon¶

Abstract Service_Amazon class.

Implements common methods & properties used by all Amazon services
« More »

# Service_Amazon_S3¶

Abstract Service_Amazon_S3 class.

Provides common methods and properties to all of the S3 tasks
« More »

# SmartyTask¶

A phing task for generating output by using Smarty.

This is based on the TexenTask from Apache's Velocity engine. This class was originally proted in order to provide a template compiling system for Torque. TODO: - Add Path / useClasspath support?
« More »

# Ssh2MethodConnectionParam¶

Class that holds parameters for an ssh2_connect $methods parameter This corresponds to the client_to_server and server_to_client keys of the optional $methods parameter for the ssh2_connect function

« More »

# Ssh2MethodParam¶

Class that holds parameters for an ssh2_connect $methods parameter This corresponds to the optional $methods parameter for the ssh2_connect function

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# SshTask¶

Execute commands on a remote host using ssh.

Use \Project#createTask to register a new Task.
« More »

# SymlinkTask¶

Generates symlinks based on a target / link combination.

Can also symlink contents of a directory, individually Single target symlink example: <code> <symlink target="/some/shared/file" link="${project.basedir}/htdocs/my_file" /> </code> Symlink entire contents of directory This will go through the contents of "/my/shared/library/*" and create a symlink for each entry into ${project.basedir}/library/ <code> <symlink link="${project.basedir}/library"> <fileset dir="/my/shared/library"> <include name="*" /> </fileset> </symlink> </code>
« More »

# TarFileSet¶

This is a FileSet with the option to specify permissions.

Permissions are currently not implemented by PEAR Archive_Tar, but hopefully they will be in the future.
« More »

# TarTask¶

Creates a tar archive using PEAR Archive_Tar.

This is very closely based on the ANT class of the same name.
« More »

# UntarTask¶

Extracts one or several tar archives using PEAR Archive_Tar

This is very closely based on the ANT class of the same name.
« More »

# UnzipTask¶

Extracts one or several zip archives using ZipArchive class.

This is very closely based on the ANT class of the same name.
« More »

# VersionTask¶

VersionTask

Increments a three-part version number from a given file and writes it back to the file. Incrementing is based on given releasetype, which can be one of Major, Minor and Bugfix. Resulting version number is also published under supplied property.
« More »

# WikiPublishTask¶

Publish Wiki document using Wiki API.

Use \Project#createTask to register a new Task.
« More »

# XmlLintTask¶

A XML lint task. Checking syntax of one or more XML files against an XML Schema using the DOM extension.

Use \Project#createTask to register a new Task.
« More »

# XmlPropertyTask¶

Task for setting properties from an XML file in buildfiles.

Use \Project#createTask to register a new Task.
« More »

# ZendCodeAnalyzerTask¶

ZendCodeAnalyzerTask analyze PHP source code using the ZendCodeAnalyzer included in Zend Studio 5.1

Available warnings: <b>zend-error</b> - %s(line %d): %s <b>oneline-comment</b> - One-line comment ends with tag. <b>bool-assign</b> - Assignment seen where boolean expression is expected. Did you mean '==' instead of '='? <b>bool-print</b> - Print statement used when boolean expression is expected. <b>bool-array</b> - Array used when boolean expression is expected. <b>bool-object</b> - Object used when boolean expression is expected. <b>call-time-ref</b> - Call-time reference is deprecated. Define function as accepting parameter by reference instead. <b>if-if-else</b> - In if-if-else construction else relates to the closest if. Use braces to make the code clearer. <b>define-params</b> - define() requires two or three parameters. <b>define-const</b> - First parameter for define() should be string. Maybe you forgot quotes? <b>break-var</b> - Break/continue with variable is dangerous - break level can be out of scope. <b>break-depth</b> - Break/continue with depth more than current nesting level. <b>var-once</b> - Variable '%s' encountered only once. May be a typo? <b>var-arg-unused</b> - Function argument '%s' is never used. <b>var-global-unused</b> - Global variable '%s' is defined but never used. <b>var-use-before-def</b> - Variable '%s' is used before it was assigned. <b>var-use-before-def-global</b> - Global variable '%s' is used without being assigned. You are probably relying on register_globals feature of PHP. Note that this feature is off by default. <b>var-no-global</b> - PHP global variable '%s' is used as local. Maybe you wanted to define '%s' as global? <b>var-value-unused</b> - Value assigned to variable '%s' is never used <b>var-ref-notmodified</b> - Function parameter '%s' is passed by reference but never modified. Consider passing by value. <b>return-empty-val</b> - Function '%s' has both empty return and return with value. <b>return-empty-used</b> - Function '%s' has empty return but return value is used. <b>return-noref</b> - Function '%s' returns reference but the value is not assigned by reference. Maybe you meant '=&' instead of '='? <b>return-end-used</b> - Control reaches the end of function '%s'(file %s, line %d) but return value is used. <b>sprintf-miss-args</b> - Missing arguments for sprintf: format reqires %d arguments but %d are supplied. <b>sprintf-extra-args</b> - Extra arguments for sprintf: format reqires %d arguments but %d are supplied. <b>unreach-code</b> - Unreachable code in function '%s'. <b>include-var</b> - include/require with user-accessible variable can be dangerous. Consider using constant instead. <b>non-object</b> - Variable '%s' used as object, but has different type. <b>bad-escape</b> - Bad escape sequence: \%c, did you mean \\%c? <b>empty-cond</b> - Condition without a body <b>expr-unused</b> - Expression result is never used
« More »

# ZipFileSet¶

This is a FileSet with the to specify permissions.

Permissions are currently not implemented by PEAR Archive_Tar, but hopefully they will be in the future.
« More »

# ZipTask¶

Creates a zip archive using PHP ZipArchive extension/

This is very closely based on the ANT class of the same name.
« More »

### Classes, interfaces and traits

# PhkPackageTask¶

See {@link http://phk.tekwire.net/} for more information about PHK.

Use \Project#createTask to register a new Task.
« More »

# PhkPackageWebAccess¶

« More »

# PhkPackageWebAccessPath¶

« More »

### Classes, interfaces and traits

# DbDeployTask¶

Generate SQL script for db using dbdeploy schema version table and delta scripts

<dbdeploy url="mysql:host=localhost;dbname=test" userid="dbdeploy" password="dbdeploy" dir="db" outputfile="">
« More »

# DbmsSyntax¶

Utility class for generating necessary server-specific SQL commands

« More »

# DbmsSyntaxFactory¶

Factory for generating dbms-specific syntax-generating objects

« More »

# DbmsSyntaxMsSql¶

Utility class for generating necessary server-specific SQL commands

« More »

# DbmsSyntaxMysql¶

Utility class for generating necessary server-specific SQL commands

« More »

# DbmsSyntaxOracle¶

Utility class for generating necessary server-specific SQL commands

« More »

# DbmsSyntaxPgSQL¶

Utility class for generating necessary server-specific SQL commands

« More »

# DbmsSyntaxSQLite¶

Utility class for generating necessary server-specific SQL commands

« More »

### Classes, interfaces and traits

# PhingPhpDocumentorErrorTracker¶

Phing subclass of the ErrorTracker class provided with PhpDocumentor to work around limitations in PhpDocumentor API.

This class is necessary because PhpDocumentor does directly output errors and warnings occured during testing for undocumented elements to stdout. This class is injected globally to force PhpDocumentor to use phing's logging mechanism. Obviously this is far from ideal, but there's also no solution given the inflexibility of the PhpDocumentor design.
« More »

# PhingPhpDocumentorSetup¶

Phing subclass of the phpDocumentor_setup class provided with PhpDocumentor to work around limitations in PhpDocumentor API.

This class is necessary because phpDocumentor_setup does not expose a complete API for setting configuration options. Because this class must directly modify some "private" GLOBAL(!) configuration variables, it is liable to break if the PhpDocumentor internal implementation changes. Obviously this is far from ideal, but there's also no solution given the inflexibility of the PhpDocumentor design.
« More »

# PhpDocumentor2Task¶

PhpDocumentor2 Task (http://www.phpdoc.org) Based on the DocBlox Task

Use \Project#createTask to register a new Task.
« More »

# PhpDocumentor2Wrapper¶

Wrapper around PhpDocumentor2 (so we retain PHP 5.2 compatibility in the main task)

« More »

# PhpDocumentorExternalTask¶

Task to run phpDocumentor with an external process

This classes uses the commandline phpdoc script to build documentation. Use this task instead of the PhpDocumentorTask when you've a clash with the Smarty libraries.
« More »

# PhpDocumentorTask¶

Task to run PhpDocumentor.

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# CoverageMerger¶

Saves coverage output of the test to a specified database

« More »

# CoverageMergerTask¶

Merges code coverage snippets into a code coverage database

Use \Project#createTask to register a new Task.
« More »

# CoverageReportTask¶

Transforms information in a code coverage database to XML

Use \Project#createTask to register a new Task.
« More »

# CoverageReportTransformer¶

Transform a Phing/Xdebug code coverage xml report.

The default transformation generates an html report in framed style.
« More »

# CoverageSetupTask¶

Initializes a code coverage database

Use \Project#createTask to register a new Task.
« More »

# CoverageThresholdTask¶

Stops the build if any of the specified coverage threshold was not reached

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# SvnBaseTask¶

Base class for Subversion tasks

Use \Project#createTask to register a new Task.
« More »

# SvnCheckoutTask¶

Checks out a repository to a local directory

Use \Project#createTask to register a new Task.
« More »

# SvnCommitTask¶

Commits changes in a local working copy to the repository

Use \Project#createTask to register a new Task.
« More »

# SvnCopyTask¶

Copies a repository from the repository url to another

Use \Project#createTask to register a new Task.
« More »

# SvnExportTask¶

Exports/checks out a repository to a local directory with authentication

Use \Project#createTask to register a new Task.
« More »

# SvnInfoTask¶

Parses the output of 'svn info --xml' and

Use \Project#createTask to register a new Task.
« More »

# SvnLastRevisionTask¶

Stores the number of the last revision of a workingcopy in a property

Use \Project#createTask to register a new Task.
« More »

# SvnListTask¶

Stores the output of a list command on a workingcopy or repositoryurl in a property.

This stems from the SvnLastRevisionTask.
« More »

# SvnLogTask¶

Stores the output of a log command on a workingcopy or repositoryurl in a property.

This stems from the SvnLastRevisionTask.
« More »

# SvnSwitchTask¶

Switches a repository at a given local directory to a different location

Use \Project#createTask to register a new Task.
« More »

# SvnUpdateTask¶

Updates a repository in local directory

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# IoncubeComment¶

Wrapper for comments for ionCube tasks

« More »

# IoncubeEncoderTask¶

Invokes the ionCube Encoder (PHP4 or PHP5)

Use \Project#createTask to register a new Task.
« More »

# IoncubeLicenseTask¶

Invokes the ionCube "make_license" program

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# PHPMDFormatterElement¶

A wrapper for the implementations of PHPMDResultFormatter.

« More »

# PHPMDTask¶

Runs PHP Mess Detector. Checking PHP files for several potential problems based on rulesets.

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# PHPLocTask¶

Runs phploc a tool for quickly measuring the size of PHP projects.

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# DefaultPDOQuerySplitter¶

Splits SQL source into queries using simple regular expressions

Extracted from PDOSQLExecTask::runStatements()
« More »

# DummyPDOQuerySplitter¶

Dummy query splitter: converts entire input into single SQL string

« More »

# PDOQuerySplitter¶

Base class for classes that split SQL source into separate queries

« More »

# PDOResultFormatter¶

Abstract

« More »

# PDOSQLExecFormatterElement¶

A class to represent the nested <formatter> element for PDO SQL results.

This class is inspired by the similarly-named class in the PHPUnit tasks.
« More »

# PDOSQLExecTask¶

Executes a series of SQL statements on a database using PDO.

<p>Statements can either be read in from a text file using the <i>src</i> attribute or from between the enclosing SQL tags.</p> <p>Multiple statements can be provided, separated by semicolons (or the defined <i>delimiter</i>). Individual lines within the statements can be commented using either --, // or REM at the start of the line.</p> <p>The <i>autocommit</i> attribute specifies whether auto-commit should be turned on or off whilst executing the statements. If auto-commit is turned on each statement will be executed and committed. If it is turned off the statements will all be executed as one transaction.</p> <p>The <i>onerror</i> attribute specifies how to proceed when an error occurs during the execution of one of the statements. The possible values are: <b>continue</b> execution, only show the error; <b>stop</b> execution and commit transaction; and <b>abort</b> execution and transaction and fail task.</p>
« More »

# PDOSQLExecTransaction¶

"Inner" class that contains the definition of a new transaction element.

Transactions allow several files or blocks of statements to be executed using the same JDBC connection and commit operation in between.
« More »

# PgsqlPDOQuerySplitter¶

Splits PostgreSQL's dialect of SQL into separate queries

Unlike DefaultPDOQuerySplitter this uses a lexer instead of regular expressions. This allows handling complex constructs like C-style comments (including nested ones) and dollar-quoted strings.
« More »

# PlainPDOResultFormatter¶

Plain text formatter for PDO results.

« More »

# XMLPDOResultFormatter¶

XML formatter for PDO results.

This class reprsents the output of a query using a simple XML schema. <results> <row> <col name="id">value</col> <col name="name">value2</col> </row> <row> <col name="id">value</col> <col name="name">value2</col> </row> </results> The actual names of the colums will depend on the fetchmode that was used with PDO.
« More »

### Classes, interfaces and traits

# StopwatchTask¶

Stopwatch.

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# CreoleSQLExecTask¶

Executes a series of SQL statements on a database using Creole.

<p>Statements can either be read in from a text file using the <i>src</i> attribute or from between the enclosing SQL tags.</p> <p>Multiple statements can be provided, separated by semicolons (or the defined <i>delimiter</i>). Individual lines within the statements can be commented using either --, // or REM at the start of the line.</p> <p>The <i>autocommit</i> attribute specifies whether auto-commit should be turned on or off whilst executing the statements. If auto-commit is turned on each statement will be executed and committed. If it is turned off the statements will all be executed as one transaction.</p> <p>The <i>onerror</i> attribute specifies how to proceed when an error occurs during the execution of one of the statements. The possible values are: <b>continue</b> execution, only show the error; <b>stop</b> execution and commit transaction; and <b>abort</b> execution and transaction and fail task.</p>
« More »

# SQLExecTransaction¶

"Inner" class that contains the definition of a new transaction element.

Transactions allow several files or blocks of statements to be executed using the same JDBC connection and commit operation in between.
« More »

### Classes, interfaces and traits

# GitBaseTask¶

Base class for Git tasks

Use \Project#createTask to register a new Task.
« More »

# GitBranchTask¶

Wrapper aroung git-branch

Use \Project#createTask to register a new Task.
« More »

# GitCheckoutTask¶

Wrapper around git-checkout

Use \Project#createTask to register a new Task.
« More »

# GitCloneTask¶

Wrapper around git-clone

Use \Project#createTask to register a new Task.
« More »

# GitCommitTask¶

Wrapper around git-commit

Use \Project#createTask to register a new Task.
« More »

# GitFetchTask¶

Wrapper aroung git-fetch

Use \Project#createTask to register a new Task.
« More »

# GitGcTask¶

Wrapper around git-gc

Use \Project#createTask to register a new Task.
« More »

# GitInitTask¶

Repository initialization task

Use \Project#createTask to register a new Task.
« More »

# GitLogTask¶

Wrapper aroung git-log

Use \Project#createTask to register a new Task.
« More »

# GitMergeTask¶

Wrapper aroung git-merge

Use \Project#createTask to register a new Task.
« More »

# GitPullTask¶

Wrapper aroung git-pull

Use \Project#createTask to register a new Task.
« More »

# GitPushTask¶

Wrapper aroung git-push

Use \Project#createTask to register a new Task.
« More »

# GitTagTask¶

Wrapper around git-tag

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# SimpleTestCountResultFormatter¶

Dummy result formatter used to count SimpleTest results

« More »

# SimpleTestDebugResultFormatter¶

Prints plain text output of the test to a specified Writer.

« More »

# SimpleTestFormatterElement¶

Child class of "FormatterElement", overrides setType to provide other formatter classes for SimpleTest

« More »

# SimpleTestPlainResultFormatter¶

Prints plain text output of the test to a specified Writer.

« More »

# SimpleTestResultFormatter¶

This abstract class describes classes that format the results of a SimpleTest testrun.

« More »

# SimpleTestSummaryResultFormatter¶

Prints short summary output of the test to Phing's logging system.

« More »

# SimpleTestTask¶

Runs SimpleTest tests.

Use \Project#createTask to register a new Task.
« More »

# SimpleTestXmlResultFormatter¶

Prints plain text output of the test to a specified Writer.

« More »

### Classes, interfaces and traits

# ApiGenTask¶

ApiGen task (http://apigen.org).

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# AbstractLiquibaseTask¶

Abstract Liquibase task. Base class for all Liquibase Phing tasks.

Use \Project#createTask to register a new Task.
« More »

# LiquibaseChangeLogTask¶

Task to create a changelog file.

Use \Project#createTask to register a new Task.
« More »

# LiquibaseDbDocTask¶

Task to create a javadoc-like documentation based on current database and changelog.

Use \Project#createTask to register a new Task.
« More »

# LiquibaseDiffTask¶

Task to create the diff between two databases. Will output the changes needed to convert the reference database to the database.

Use \Project#createTask to register a new Task.
« More »

# LiquibaseParameter¶

Base class for those classes that can appear inside the build file as stand alone data types.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# LiquibaseProperty¶

Base class for those classes that can appear inside the build file as stand alone data types.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# LiquibaseRollbackTask¶

Rollbacks the database changes.

Use \Project#createTask to register a new Task.
« More »

# LiquibaseTagTask¶

Task to tag the current database state. In case you tag the database multiple times without applying a new changelog before, the tags will overwrite each other!

Use \Project#createTask to register a new Task.
« More »

# LiquibaseTask¶

Task for running liquibase commands that doesn't have their own commands yet.

Parameters can be provided by nested <parameter name='foo' value='bar' /> tags. That will result in --foo='bar' on the command line.
« More »

# LiquibaseUpdateTask¶

Task to update the database to latest version of the changelog file.

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# CloverPHPUnitResultFormatter¶

Prints Clover XML output of the test

« More »

# SummaryPHPUnitResultFormatter¶

Prints short summary output of the test to Phing's logging system.

« More »

# XMLPHPUnitResultFormatter¶

Prints XML output of the test to a specified Writer

« More »

### Classes, interfaces and traits

# PHPUnitResultFormatter¶

This abstract class describes classes that format the results of a PHPUnit testrun.

« More »

# PlainPHPUnitResultFormatter¶

Prints plain text output of the test to a specified Writer.

« More »

### Classes, interfaces and traits

# BatchTest¶

Scans a list of files given by the fileset attribute, extracts valid test cases

« More »

# FormatterElement¶

A wrapper for the implementations of PHPUnit2ResultFormatter.

« More »

# PHPUnitReportTask¶

Transform a PHPUnit xml report using XSLT.

This transformation generates an html report in either framed or non-framed style. The non-framed style is convenient to have a concise report via mail, the framed report is much more convenient if you want to browse into different packages or testcases since it is a Javadoc like report.
« More »

# PHPUnitTask¶

Runs PHPUnit tests.

Use \Project#createTask to register a new Task.
« More »

# PHPUnitTestRunner¶

Simple Testrunner for PHPUnit that runs all tests of a testsuite.

« More »

# PHPUnitUtil¶

Various utility functions

« More »

### Classes, interfaces and traits

# PathToFileSet¶

Coverts a path to a fileset.

This is usefull if you have a path but need to use a fileset as input in a phing task. Example ======= ``` <path id="modified.sources.path" dir="C:\Path\to\phing\classes\phing\" /> <pathtofileset name="modified.sources.fileset" pathrefid="modified.sources.path" dir="." /> <copy todir="C:\Path\to\phing\docs\api"> <mapper type="glob" from="*.php" to="*.php.bak" /> <fileset refid="modified.sources.fileset" /> </copy> ```
« More »

### Classes, interfaces and traits

# RegexTask¶

Regular Expression Task for properties.

<pre> <propertyregex property="pack.name" subject="package.ABC.name" pattern="package\.([^.]*)\.name" match="$1" casesensitive="false" defaultvalue="test1"/> <echo message="${pack.name}"/> <propertyregex property="pack.name" override="true" subject="package.ABC.name" pattern="(package)\.[^.]*\.(name)" replace="$1.DEF.$2" casesensitive="false" defaultvalue="test2"/> <echo message="${pack.name}"/> </pre>
« More »

### Classes, interfaces and traits

# ZendGuardEncodeTask¶

Encodes files using Zeng Guard Encoder

This is very closely based on the ANT class of the same name.
« More »

# ZendGuardFileSet¶

This is a FileSet with the to specify permissions.

Permissions are currently not implemented by PEAR Archive_Tar, but hopefully they will be in the future.
« More »

# ZendGuardLicenseTask¶

Produce license files using Zeng Guard.

The task can produce a license file from the given license properties or it can use a template.
« More »

### Classes, interfaces and traits

# PharMetadata¶

« More »

# PharMetadataElement¶

« More »

### Classes, interfaces and traits

# PhpDependAnalyzerElement¶

Analyzer element for the PhpDependTask

« More »

# PhpDependLoggerElement¶

Logger element for the PhpDependTask.

« More »

# PhpDependTask¶

Runs the PHP_Depend software analyzer and metric tool.

Performs static code analysis on a given source base.
« More »

### Classes, interfaces and traits

# Arg¶

Implementation of console argument

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# SymfonyConsoleTask¶

Symfony Console Task

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# DefaultPHPCPDResultFormatter¶

Prints plain text output of phpcpd run

« More »

# PHPCPDResultFormatter¶

This abstract class describes classes that format the results of a PHPCPD run.

« More »

# PMDPHPCPDResultFormatter¶

Prints PMD-XML output of phpcpd run

« More »

### Classes, interfaces and traits

# PHPCPDFormatterElement¶

A wrapper for the implementations of PHPCPDResultFormatter.

« More »

# PHPCPDTask¶

Runs PHP Copy & Paste Detector. Checking PHP files for duplicated code.

Refactored original PhpCpdTask provided by Timo Haberkern <timo.haberkern@fantastic-bits.de>
« More »

### Classes, interfaces and traits

# zsdtBaseTask¶

Class ZendServerDeploymentToolTask

Use \Project#createTask to register a new Task.
« More »

# zsdtPackTask¶

Class ZendServerDeploymentToolTask

Use \Project#createTask to register a new Task.
« More »

# zsdtValidateTask¶

Class ZendServerDeploymentToolTask

Use \Project#createTask to register a new Task.
« More »

### Classes, interfaces and traits

# PEAR_PackageFileManager_Fileset¶

Builds list of files for PEAR_PackageFileManager using a Phing FileSet.

Some code here is taken from PEAR_PackageFileManager_File -- getting results from flat array into the assoc array expected from getFileList().
« More »

### Classes, interfaces and traits

# BufferedReader¶

Convenience class for reading files.

« More »

# BufferedWriter¶

Convenience class for writing files.

« More »

# ConsoleReader¶

Convenience class for reading console input.

« More »

# FileInputStream¶

Input stream subclass for file streams.

« More »

# FileOutputStream¶

Output stream subclass for file streams.

« More »

# FileReader¶

Convenience class for reading files.

Unlike the Java counterpart, this class does not (yet) handle character set transformations. This will be an important function of this class with move to supporting PHP6.
« More »

# FileSystem¶

This is an abstract class for platform specific filesystem implementations you have to implement each method in the platform specific filesystem implementation classes Your local filesytem implementation must extend this class.

You should also use this class as a template to write your local implementation Some native PHP filesystem specific methods are abstracted here as well. Anyway you _must_ always use this methods via a PhingFile object (that by nature uses the *FileSystem drivers to access the real filesystem via this class using natives. FIXME: - Error handling reduced to min fallthrough runtime exceptions more precise errorhandling is done by the PhingFile class
« More »

# FileWriter¶

Convenience class for performing file write operations.

Unlike the Java counterpart, this class does not (yet) handle character set transformations. This will be an important function of this class with move to supporting PHP6.
« More »

# FilterReader¶

Wrapper class for readers, which can be used to apply filters.

« More »

# InputStream¶

Wrapper class for PHP stream that supports read operations.

« More »

# InputStreamReader¶

Writer class for OutputStream objects.

Unlike the Java counterpart, this class does not (yet) handle character set transformations. This will be an important function of this class with move to supporting PHP6.
« More »

# IOException¶

Extends Exception to take advantage of methods therein.

« More »

# OutputStream¶

Wrapper class for PHP stream that supports write operations.

« More »

# OutputStreamWriter¶

Writer class for OutputStream objects.

Unlike the Java counterpart, this class does not (yet) handle character set transformations. This will be an important function of this class with move to supporting PHP6.
« More »

# PhingFile¶

An abstract representation of file and directory pathnames.

« More »

# Reader¶

Abstract class for reading character streams.

« More »

# StringReader¶

Dummy class for reading from string of characters.

« More »

# UnixFileSystem¶

UnixFileSystem class. This class encapsulates the basic file system functions for platforms using the unix (posix)-stylish filesystem. It wraps php native functions suppressing normal PHP error reporting and instead uses Exception to report and error.

This class is part of a oop based filesystem abstraction and targeted to run on all supported php platforms. Note: For debugging turn track_errors on in the php.ini. The error messages and log messages from this class will then be clearer because $php_errormsg is passed as part of the message. FIXME: - Comments - Error handling reduced to min, error are handled by PhingFile mainly
« More »

# Win32FileSystem¶

This is an abstract class for platform specific filesystem implementations you have to implement each method in the platform specific filesystem implementation classes Your local filesytem implementation must extend this class.

You should also use this class as a template to write your local implementation Some native PHP filesystem specific methods are abstracted here as well. Anyway you _must_ always use this methods via a PhingFile object (that by nature uses the *FileSystem drivers to access the real filesystem via this class using natives. FIXME: - Error handling reduced to min fallthrough runtime exceptions more precise errorhandling is done by the PhingFile class
« More »

# WinNTFileSystem¶

FileSystem for Windows NT/2000.

You should also use this class as a template to write your local implementation Some native PHP filesystem specific methods are abstracted here as well. Anyway you _must_ always use this methods via a PhingFile object (that by nature uses the *FileSystem drivers to access the real filesystem via this class using natives. FIXME: - Error handling reduced to min fallthrough runtime exceptions more precise errorhandling is done by the PhingFile class
« More »

# Writer¶

Abstract class for writing character streams.

« More »

### Classes, interfaces and traits

# Character¶

« More »

# EventObject¶

« More »

# FileNotFoundException¶

« More »

# NullPointerException¶

« More »

# SecurityException¶

« More »

### Classes, interfaces and traits

# Properties¶

Convenience class for reading and writing property files.

FIXME - Add support for arrays (separated by ',')
« More »

# Register¶

Static class to handle a slot-listening system.

Unlike the slots/signals Qt model, this class manages something that is more like a simple hashtable, where each slot has only one value. For that reason "Registers" makes more sense, the reference being to CPU registers. This could be used for anything, but it's been built for a pretty specific phing need, and that is to allow access to dynamic values that are set by logic that is not represented in a build file. For exampe, we need a system for getting the current resource (file) that is being processed by a filterchain in a fileset. Each slot corresponds to only one read-only, dynamic-value RegisterSlot object. In a build.xml register slots are expressed using a syntax similar to variables: <replaceregexp> <regexp pattern="\n" replace="%{task.current_file}"/> </replaceregexp> The task/type must provide a supporting setter for the attribute: <code> function setListeningReplace(RegisterSlot $slot) { $this->replace = $slot; } // in main() if ($this->replace instanceof RegisterSlot) { $this->regexp->setReplace($this->replace->getValue()); } else { $this->regexp->setReplace($this->replace); } </code>
« More »

# RegisterSlot¶

Represents a slot in the register.

« More »

# StringHelper¶

String helper utility class.

This class includes some Java-like functions for parsing strings, as well as some functions for getting qualifiers / unqualifying phing-style classpaths. (e.g. "phing.util.StringHelper").
« More »

# Timer¶

This class can be used to obtain the execution time of all of the scripts that are executed in the process of building a page.

Example: To be done before any scripts execute: $Timer = new Timer; $Timer->Start_Timer(); To be done after all scripts have executed: $timer->Stop_Timer(); $timer->Get_Elapsed_Time(int number_of_places);
« More »

### Classes, interfaces and traits

# FileNameMapper¶

Interface for filename mapper classes.

« More »

# FlattenMapper¶

Removes any directory information from the passed path.

« More »

# GlobMapper¶

Uses glob patterns to perform filename transformations.

« More »

# IdentityMapper¶

This mapper does nothing ;)

« More »

# MergeMapper¶

For merging files into a single file. In practice just returns whatever value was set for "to".

« More »

# RegexpMapper¶

Uses regular expressions to perform filename transformations.

« More »

### Classes, interfaces and traits

# Capsule¶

Capsule is a simple "template" engine that essentially provides an isolated context for PHP scripts.

There is no special templating language, and therefore no limitations to what can be accomplished within templates. The main purpose of Capsule is to separate the business logic from display / output logic.
« More »

### Classes, interfaces and traits

# InputHandler¶

Plugin to Phing to handle requests for user input.

« More »

# DefaultInputHandler¶

Prompts using print(); reads input from Console.

« More »

# InputRequest¶

Encapsulates an input request.

« More »

# MultipleChoiceInputRequest¶

Encapsulates an input request.

« More »

# YesNoInputRequest¶

Encapsulates an input request that returns a boolean (yes/no).

« More »

### Classes, interfaces and traits

# ChainableReader¶

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

« More »

# BaseFilterReader¶

Base class for core filter readers.

« More »

# BaseParamFilterReader¶

Base class for core filter readers.

« More »

# Comment¶

The class that holds a comment representation.

« More »

# Contains¶

Holds a contains element.

« More »

# ExpandProperties¶

Expands Phing Properties, if any, in the data.

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

# HeadFilter¶

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 »

# IconvFilter¶

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 »

# LineContains¶

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 »

# LineContainsRegexp¶

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 »

# PrefixLines¶

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 »

# ReplaceRegexp¶

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 »

# ReplaceTokens¶

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 »

# ReplaceTokensWithFile¶

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 »

# SortFilter¶

<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 »

# StripLineBreaks¶

Filter to flatten the stream to a single line.

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

# StripLineComments¶

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 »

# StripPhpComments¶

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 reccomended to make it work on top of a buffered reader.
« More »

# StripWhitespace¶

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

« More »

# SuffixLines¶

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 »

# TabToSpaces¶

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 »

# TailFilter¶

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 »

# TidyFilter¶

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 »

# Token¶

Holds a token.

« More »

# TranslateGettext¶

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 »

# XincludeFilter¶

Applies Xinclude parsing to incoming text.

Uses PHP DOM XML support
« More »

# XsltFilter¶

Applies XSL stylesheet to incoming text.

Uses PHP XSLT support (libxslt).
« More »

# XSLTParam¶

Class that holds an XSLT parameter.

« More »

### Classes, interfaces and traits

# ChainReaderHelper¶

Process a FilterReader chain.

Here, the interesting method is 'getAssembledReader'. The purpose of this one is to create a simple Reader object which apply all filters on another primary Reader object. For example : In copyFile (phing.util.FileUtils) the primary Reader is a FileReader object (more accuratly, a BufferedReader) previously setted for the source file to copy. So, consider this filterchain : <filterchain> <stripphpcomments /> <linecontains> <contains value="foo"> </linecontains> <tabtospaces tablength="8" /> </filterchain> getAssembledReader will return a Reader object wich read on each of these filters. Something like this : ('->' = 'which read data from') : [TABTOSPACES] -> [LINECONTAINS] -> [STRIPPHPCOMMENTS] -> [FILEREADER] (primary reader) So, getAssembledReader will return the TABTOSPACES Reader object. Then each read done with this Reader object will follow this path. Hope this explanation is clear :) TODO: Implement the classPath feature.
« More »

# IniFileTokenReader¶

Class that allows reading tokens from INI files.

« More »

# TokenReader¶

Abstract class for TokenReaders.

« More »

### Classes, interfaces and traits

# DataStore¶

An abstract representation of file and directory pathnames.

« More »

# DirectoryScanner¶

Class for scanning a directory for files/directories that match a certain criteria.

These criteria consist of a set of include and exclude patterns. With these patterns, you can select which files you want to have included, and which files you want to have excluded. The idea is simple. A given directory is recursively scanned for all files and directories. Each file/directory is matched against a set of include and exclude patterns. Only files/directories that match at least one pattern of the include pattern list, and don't match a pattern of the exclude pattern list will be placed in the list of files/directories found. When no list of include patterns is supplied, "**" will be used, which means that everything will be matched. When no list of exclude patterns is supplied, an empty list is used, such that nothing will be excluded. The pattern matching is done as follows: The name to be matched is split up in path segments. A path segment is the name of a directory or file, which is bounded by DIRECTORY_SEPARATOR ('/' under UNIX, '\' under Windows). E.g. "abc/def/ghi/xyz.php" is split up in the segments "abc", "def", "ghi" and "xyz.php". The same is done for the pattern against which should be matched. Then the segments of the name and the pattern will be matched against each other. When '**' is used for a path segment in the pattern, then it matches zero or more path segments of the name. There are special case regarding the use of DIRECTORY_SEPARATOR at the beginning of the pattern and the string to match: When a pattern starts with a DIRECTORY_SEPARATOR, the string to match must also start with a DIRECTORY_SEPARATOR. When a pattern does not start with a DIRECTORY_SEPARATOR, the string to match may not start with a DIRECTORY_SEPARATOR. When one of these rules is not obeyed, the string will not match. When a name path segment is matched against a pattern path segment, the following special characters can be used: '*' matches zero or more characters, '?' matches one character. Examples: "**\*.php" matches all .php files/dirs in a directory tree. "test\a??.php" matches all files/dirs which start with an 'a', then two more characters and then ".php", in a directory called test. "**" matches everything in a directory tree. "**\test\**\XYZ*" matches all files/dirs that start with "XYZ" and where there is a parent directory called test (e.g. "abc\test\def\ghi\XYZ123"). Case sensitivity may be turned off if necessary. By default, it is turned on. Example of usage: $ds = new DirectroyScanner(); $includes = array("**\*.php"); $excludes = array("modules\*\**"); $ds->SetIncludes($includes); $ds->SetExcludes($excludes); $ds->SetBasedir("test"); $ds->SetCaseSensitive(true); $ds->Scan(); print("FILES:"); $files = ds->GetIncludedFiles(); for ($i = 0; $i < count($files);$i++) { println("$files[$i]\n"); } This will scan a directory called test for .php files, but excludes all .php files in all directories under a directory called "modules" This class is complete preg/ereg free port of the Java class org.apache.tools.ant.DirectoryScanner. Even functions that use preg/ereg internally (like split()) are not used. Only the _fast_ string functions and comparison operators (=== !=== etc) are used for matching and tokenizing.
« More »

# ExtendedFileStream¶

Extended file stream wrapper class which auto-creates directories

« More »

# FileUtils¶

File utility class.

- handles os independent stuff etc - mapper stuff - filter stuff
« More »

# LogWriter¶

Extends the Writer class to output messages to Phing's log

« More »

# PathTokenizer¶

A Path tokenizer takes a path and returns the components that make up that path.

The path can use path separators of either ':' or ';' and file separators of either '/' or '\'.
« More »

# PearPackageScanner¶

Scans for files in a PEAR package.

These criteria consist of a set of include and exclude patterns. With these patterns, you can select which files you want to have included, and which files you want to have excluded. The idea is simple. A given directory is recursively scanned for all files and directories. Each file/directory is matched against a set of include and exclude patterns. Only files/directories that match at least one pattern of the include pattern list, and don't match a pattern of the exclude pattern list will be placed in the list of files/directories found. When no list of include patterns is supplied, "**" will be used, which means that everything will be matched. When no list of exclude patterns is supplied, an empty list is used, such that nothing will be excluded. The pattern matching is done as follows: The name to be matched is split up in path segments. A path segment is the name of a directory or file, which is bounded by DIRECTORY_SEPARATOR ('/' under UNIX, '\' under Windows). E.g. "abc/def/ghi/xyz.php" is split up in the segments "abc", "def", "ghi" and "xyz.php". The same is done for the pattern against which should be matched. Then the segments of the name and the pattern will be matched against each other. When '**' is used for a path segment in the pattern, then it matches zero or more path segments of the name. There are special case regarding the use of DIRECTORY_SEPARATOR at the beginning of the pattern and the string to match: When a pattern starts with a DIRECTORY_SEPARATOR, the string to match must also start with a DIRECTORY_SEPARATOR. When a pattern does not start with a DIRECTORY_SEPARATOR, the string to match may not start with a DIRECTORY_SEPARATOR. When one of these rules is not obeyed, the string will not match. When a name path segment is matched against a pattern path segment, the following special characters can be used: '*' matches zero or more characters, '?' matches one character. Examples: "**\*.php" matches all .php files/dirs in a directory tree. "test\a??.php" matches all files/dirs which start with an 'a', then two more characters and then ".php", in a directory called test. "**" matches everything in a directory tree. "**\test\**\XYZ*" matches all files/dirs that start with "XYZ" and where there is a parent directory called test (e.g. "abc\test\def\ghi\XYZ123"). Case sensitivity may be turned off if necessary. By default, it is turned on. Example of usage: $ds = new DirectroyScanner(); $includes = array("**\*.php"); $excludes = array("modules\*\**"); $ds->SetIncludes($includes); $ds->SetExcludes($excludes); $ds->SetBasedir("test"); $ds->SetCaseSensitive(true); $ds->Scan(); print("FILES:"); $files = ds->GetIncludedFiles(); for ($i = 0; $i < count($files);$i++) { println("$files[$i]\n"); } This will scan a directory called test for .php files, but excludes all .php files in all directories under a directory called "modules" This class is complete preg/ereg free port of the Java class org.apache.tools.ant.DirectoryScanner. Even functions that use preg/ereg internally (like split()) are not used. Only the _fast_ string functions and comparison operators (=== !=== etc) are used for matching and tokenizing.
« More »

# SourceFileScanner¶

Utility class that collects the functionality of the various scanDir methods that have been scattered in several tasks before.

The only method returns an array of source files. The array is a subset of the files given as a parameter and holds only those that are newer than their corresponding target files.
« More »

### Classes, interfaces and traits

# RegexpEngine¶

Contains some shared attributes and methods -- and some abstract methods with engine-specific implementations that sub-classes must override.

« More »

# PregEngine¶

PREG Regexp Engine.

Implements a regexp engine using PHP's preg_match(), preg_match_all(), and preg_replace() functions.
« More »

# Regexp¶

A factory class for regex functions.

« More »

### Classes, interfaces and traits

# CustomChildCreator¶

Interface for elements that want to be able to create custom child elements at runtime.

« More »

# AbstractHandler¶

This is an abstract class all SAX handler classes must extend

« More »

# AbstractSAXParser¶

The abstract SAX parser class.

This class represents a SAX parser. It is a abstract calss that must be implemented by the real parser that must extend this class
« More »

# DataTypeHandler¶

Configures a Project (complete with Targets and Tasks) based on a XML build file.

<p> Design/ZE2 migration note: If PHP would support nested classes. All the phing/parser/*Filter classes would be nested within this class
« More »

# ElementHandler¶

The generic element handler class.

This class handles the occurance of runtime registered tags like datatypes (fileset, patternset, etc) and it's possible nested tags. It introspects the implementation of the class and sets up the data structures.
« More »

# ExpatParseException¶

This class throws errors for Expat, the XML processor.

« More »

# ExpatParser¶

This class is a wrapper for the PHP's internal expat parser.

It takes an XML file represented by a abstract path name, and starts parsing the file and calling the different "trap" methods inherited from the AbstractParser class. Those methods then invoke the represenatative methods in the registered handler classes.
« More »

# Location¶

Stores the file name and line number of a XML file

« More »

# PhingXMLContext¶

Track the current state of the Xml parse operation.

« More »

# ProjectConfigurator¶

The datatype handler class.

This class handles the occurance of registered datatype tags like FileSet
« More »

# ProjectHandler¶

Handler class for the <project> XML element This class handles all elements under the <project> element.

« More »

# RootHandler¶

Root filter class for a phing buildfile.

The root filter is called by the parser first. This is where the phing specific parsing starts. RootHandler decides what to do next.
« More »

# TargetHandler¶

The target handler class.

This class handles the occurance of a <target> tag and it's possible nested tags (datatypes and tasks).
« More »

### Classes, interfaces and traits

# Parameterizable¶

Parameterizable objects take genric key value pairs.

« More »

# AbstractFileSet¶

The FileSet class provides methods and properties for accessing and managing filesets. It extends ProjectComponent and thus inherits all methods and properties (not explicitly declared). See ProjectComponent for further detail.

TODO: - merge this with patternsets: FileSet extends PatternSet !!! requires additional mods to the parsing algo [HL] .... not sure if that really makes so much sense. I think that perhaps they should use common utility class if there really is that much shared functionality
« More »

# Commandline¶

Commandline objects help handling command lines specifying processes to execute.

The class can be used to define a command line as nested elements or as a helper to define a command line by an application. <p> <code> &lt;someelement&gt;<br> &nbsp;&nbsp;&lt;acommandline executable="/executable/to/run"&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;argument value="argument 1" /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;argument line="argument_1 argument_2 argument_3" /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;argument value="argument 4" /&gt;<br> &nbsp;&nbsp;&lt;/acommandline&gt;<br> &lt;/someelement&gt;<br> </code> The element <code>someelement</code> must provide a method <code>createAcommandline</code> which returns an instance of this class.
« More »

# CommandlineArgument¶

"Inner" class used for nested xml command line definitions.

« More »

# CommandlineMarker¶

Class to keep track of the position of an Argument.

<p>This class is there to support the srcfile and targetfile elements of &lt;execon&gt; and &lt;transform&gt; - don't know whether there might be additional use cases.</p> --SB
« More »

# DataType¶

Base class for those classes that can appear inside the build file as stand alone data types.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# Description¶

Description is used to provide a project-wide description element (that is, a description that applies to a buildfile as a whole).

If present, the &lt;description&gt; element is printed out before the target descriptions. Description has no attributes, only text. There can only be one project description per project. A second description element will overwrite the first.
« More »

# DirSet¶

Subclass as hint for supporting tasks that the included directories instead of files should be used.

TODO: - merge this with patternsets: FileSet extends PatternSet !!! requires additional mods to the parsing algo [HL] .... not sure if that really makes so much sense. I think that perhaps they should use common utility class if there really is that much shared functionality
« More »

# Excludes¶

Datatype which handles excluded files, classes and methods.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# ExcludesNameEntry¶

Class for holding nested excludes elements (file, class, method).

« More »

# FileList¶

FileList represents an explicitly named list of files. FileLists are useful when you want to capture a list of files regardless of whether they currently exist.

<filelist id="docfiles" dir="${phing.docs.dir}" files="chapters/Installation.html,chapters/Setup.html"/> OR <filelist dir="${doc.src.dir}" listfile="${phing.docs.dir}/PhingGuide.book"/> (or a mixture of files="" and listfile="" can be used)
« More »

# FileSet¶

Moved out of MatchingTask to make it a standalone object that could be referenced (by scripts for example).

TODO: - merge this with patternsets: FileSet extends PatternSet !!! requires additional mods to the parsing algo [HL] .... not sure if that really makes so much sense. I think that perhaps they should use common utility class if there really is that much shared functionality
« More »

# FilterChain¶

FilterChain may contain a chained set of filter readers.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# IterableFileSet¶

FileSet adapter to SPL's Iterator.

TODO: - merge this with patternsets: FileSet extends PatternSet !!! requires additional mods to the parsing algo [HL] .... not sure if that really makes so much sense. I think that perhaps they should use common utility class if there really is that much shared functionality
« More »

# Mapper¶

Filename Mapper maps source file name(s) to target file name(s).

Built-in mappers can be accessed by specifying they "type" attribute: <code> <mapper type="glob" from="*.php" to="*.php.bak"/> </code> Custom mappers can be specified by providing a dot-path to a include_path-relative class: <code> <mapper classname="myapp.mappers.DevToProdMapper" from="*.php" to="*.php"/> <!-- maps all PHP files from development server to production server, for example --> </code>
« More »

# Parameter¶

A parameter is composed of a name, type and value. Nested Parameters are also possible, but the using task/type has to support them

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# Path¶

This object represents a path as used by include_path or PATH environment variable.

This class has been adopted from the Java Ant equivalent. The ability have path structures in Phing is important; however, because of how PHP classes interact the ability to specify CLASSPATHs makes less sense than Java.Rather than providing CLASSPATH for any tasks that take classes as parameters, perhaps a better solution in PHP is to have an IncludePath task, which prepends paths to PHP's include_path INI variable. This gets around the problem that simply using a path to load the initial PHP class is not enough (in most cases the loaded class may assume that it is on the global PHP include_path, and will try to load dependent classes accordingly). The other option is to provide a way for this class to add paths to the include path, if desired -- or to create an IncludePath subclass. Once added, though, when would a path be removed from the include path? <p> <code> &lt;sometask&gt;<br> &nbsp;&nbsp;&lt;somepath&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;pathelement location="/path/to/file" /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;pathelement path="/path/to/class2;/path/to/class3" /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;pathelement location="/path/to/file3" /&gt;<br> &nbsp;&nbsp;&lt;/somepath&gt;<br> &lt;/sometask&gt;<br> </code> <p> The object implemention <code>sometask</code> must provide a method called <code>createSomepath</code> which returns an instance of <code>Path</code>. Nested path definitions are handled by the Path object and must be labeled <code>pathelement</code>.<p> The path element takes a parameter <code>path</code> which will be parsed and split into single elements. It will usually be used to define a path from an environment variable.
« More »

# PathElement¶

Helper class, holds the nested <code>&lt;pathelement&gt;</code> values.

« More »

# PatternSet¶

The patternset storage component. Carries all necessary data and methods for the patternset stuff.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# PatternSetNameEntry¶

"Internal" class for holding an include/exclude pattern.

« More »

# PearPackageFileSet¶

Fileset that contains files of an installed PEAR package.

It can be used to package up PEAR package dependencies in own release files (zip, tgz, phar).
« More »

# PhingFilterReader¶

A PhingFilterReader is a wrapper class that encloses the className and configuration of a Configurable FilterReader.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# PropertyValue¶

Class to hold a property value Class only required to make it possible to add a property as reference

« More »

# Reference¶

Class to hold a reference to another object in the project.

« More »

# RegularExpression¶

A regular expression datatype. Keeps an instance of the compiled expression for speed purposes. This compiled expression is lazily evaluated (it is compiled the first time it is needed). The syntax is the dependent on which regular expression type you are using.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# TokenSource¶

A parameter is composed of a name, type and value.

Example of usage: <replacetokens> <tokensource classname="phing.filters.util.IniFileTokenReader"> <!-- all params for the TokenReader here --> <param name="file" value="tokens.ini" /> </tokensource> </replacetokens> or: <filterreader classname="phing.filters.ReplaceTokens"> <param type="tokensource> <param name="classname" value="phing.filters.util.IniFileTokenReader" /> <param name="file" value="tokens.ini" /> </param> </filterreader>
« More »

### Classes, interfaces and traits

# ExtendFileSelector¶

This is the interface to be used by all custom selectors, those that are called through the &lt;custom&gt; tag. It is the amalgamation of two interfaces, the FileSelector and the Paramterizable interface. Note that you will almost certainly want the default behaviour for handling Parameters, so you probably want to use the BaseExtendSelector class as the base class for your custom selector rather than implementing this interface from scratch.

« More »

# FileSelector¶

This is the interface to be used by all selectors.

« More »

# SelectorContainer¶

This is the interface for selectors that can contain other selectors.

« More »

# SelectorScanner¶

An interface used to describe the actions required by any type of directory scanner that supports Selecters.

« More »

# AndSelector¶

This selector has a collection of other selectors, all of which have to select a file in order for this selector to select it.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# BaseExtendSelector¶

Convenience base class for all selectors accessed through ExtendSelector.

It provides support for gathering the parameters together as well as for assigning an error message and throwing a build exception if an error is detected.
« More »

# BaseSelector¶

A convenience base class that you can subclass Selectors from. It provides some helpful common behaviour. Note that there is no need for Selectors to inherit from this class, it is only necessary that they implement FileSelector.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# BaseSelectorContainer¶

This is the base class for selectors that can contain other selectors.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# ContainsRegexpSelector¶

Selector that filters files based on whether they contain a particular string using regexp.

It provides support for gathering the parameters together as well as for assigning an error message and throwing a build exception if an error is detected.
« More »

# ContainsSelector¶

Selector that filters files based on whether they contain a particular string.

It provides support for gathering the parameters together as well as for assigning an error message and throwing a build exception if an error is detected.
« More »

# DateSelector¶

Selector that chooses files based on their last modified date. Ant uses millisecond precision (thanks to Java); PHP is forced to use only seconds precision.

It provides support for gathering the parameters together as well as for assigning an error message and throwing a build exception if an error is detected.
« More »

# DependSelector¶

Selector that filters files based on whether they are newer than a matching file in another directory tree. It can contain a mapper element, so isn't available as an ExtendSelector (since those parameters can't hold other elements).

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# DepthSelector¶

Selector that filters files based on the how deep in the directory tree they are.

It provides support for gathering the parameters together as well as for assigning an error message and throwing a build exception if an error is detected.
« More »

# ExtendSelector¶

Selector that selects files by forwarding the request on to other classes.

TODO - Consider adding Path (phing.types.Path) support to this class and to the Mappers class. See Ant versions for implimentation details.
« More »

# FilenameSelector¶

Selector that filters files based on the filename.

It provides support for gathering the parameters together as well as for assigning an error message and throwing a build exception if an error is detected.
« More »

# MajoritySelector¶

This selector is here just to shake up your thinking a bit. Don't get too caught up in boolean, there are other ways you can evaluate a collection of selectors. This one takes a vote of the selectors it contains, and majority wins. You could also have an "all-but-one" selector, a "weighted-average" selector, and so on. These are left as exercises for the reader (as are the usecases where this would be necessary).

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# NoneSelector¶

This selector has a collection of other selectors. All of those selectors must refuse to select a file before the file is considered selected by this selector.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# NotSelector¶

This selector has one other selectors whose meaning it inverts. It actually relies on NoneSelector for its implementation of the isSelected() method, but it adds a check to ensure there is only one other selector contained within.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# OrSelector¶

This selector has a collection of other selectors, any of which have to select a file in order for this selector to select it.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# PresentSelector¶

Selector that filters files based on whether they appear in another directory tree. It can contain a mapper element, so isn't available as an ExtendSelector (since those parameters can't hold other elements).

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# SelectorUtils¶

<p>This is a utility class used by selectors and DirectoryScanner. The functionality more properly belongs just to selectors, but unfortunately DirectoryScanner exposed these as protected methods. Thus we have to support any subclasses of DirectoryScanner that may access these methods.

</p> <p>This is a Singleton.</p>
« More »

# SelectSelector¶

This selector just holds one other selector and forwards all requests to it. It exists so that there is a single selector type that can exist outside of any targets, as an element of project. It overrides all of the reference stuff so that it works as expected. Note that this is the only selector you can reference.

This class handles the common description attribute and provides a default implementation for reference handling and checking for circular references that is appropriate for types that can not be nested inside elements of the same type (i.e. patternset but not path)
« More »

# SizeSelector¶

Selector that filters files based on their size.

It provides support for gathering the parameters together as well as for assigning an error message and throwing a build exception if an error is detected.
« More »

# TypeSelector¶

Selector that selects a certain kind of file: directory or regular file.

It provides support for gathering the parameters together as well as for assigning an error message and throwing a build exception if an error is detected.
« More »