« More »

« More »

« More »

# FileListAware¶

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

« More »

# FileSetAware¶

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

« More »

# FilterChainAware¶

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

« More »

# ResourceAware¶

Trait ResourceAware

« More »

# SelectorAware¶

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

« More »

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

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

« More »

The base class for all Tasks.

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

# BuildTimeoutException¶

This exception is used to indicate timeouts.

« More »

# ChainedMapper¶

A <code>ContainerMapper</code> that chains the results of the first nested <code>FileNameMapper</code>s into sourcefiles for the second, the second to the third, and so on, returning the resulting mapped filenames from the last nested <code>FileNameMapper</code>.

« More »

# ComponentHelper¶

Component creation and configuration

« More »

# ConfigurationException¶

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

« More »

# ContainerMapper¶

A <code>FileNameMapper</code> that contains other <code>FileNameMapper</code>s.

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

# DifferentSelector¶

This selector selects files against a mapped set of target files, selecting all those files which are different.

Files with different lengths are deemed different automatically Files with identical timestamps are viewed as matching by default, unless you specify otherwise. Contents are compared if the lengths are the same and the timestamps are ignored or the same, except if you decide to ignore contents to gain speed. <p> This is a useful selector to work with programs and tasks that don't handle dependency checking properly; Even if a predecessor task always creates its output files, followup tasks can be driven off copies made with a different selector, so their dependencies are driven on the absolute state of the files, not a timestamp. <p> Clearly, however, bulk file comparisons is inefficient; anything that can use timestamps is to be preferred. If this selector must be used, use it over as few files as possible, perhaps following it with an &lt;uptodate;&gt to keep the descendant routines conditional.
« More »

# ExitStatusException¶

BuildException + exit status.

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

# IsFileSelected¶

This is a condition that checks to see if a file passes an embedded 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 »

# MapEntry¶

Helper class, holds the nested &lt;map&gt; values. Elements will look like this: &lt;map from=&quot;d:&quot; to=&quot;/foo&quot;/&gt;

When running on windows, the prefix comparison will be case insensitive.
« 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 application can invoke the start() method, passing any commandline arguments or additional properties.
« More »

« More »

# ProgressLogger¶

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 »

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

# PropertyHelper¶

Component creation and configuration

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

The base class for all Tasks.

« More »

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

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

# FileParserFactoryInterface¶

This interface can be used to implement a fileParserFactory to create FileParsers based on config.

Currently it is used in the PropertyTask to deliver the correct parser based on filetype.
« More »

# FileParserInterface¶

This interface can be used to implement a fileParser for property files.

For example: You can implement a .ini-Fileparser or .yaml/.xml/.php.
« More »

« More »

# BufferedWriter¶

Convenience class for writing files.

« More »

Convenience class for reading console input.

« More »

# FileInputStream¶

Input stream subclass for file streams.

« More »

# FileOutputStream¶

Output stream subclass for file streams.

« More »

# FileParserFactory¶

The factory to create fileParsers based on extension name from PhingFile->getFileExtension()

« More »

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 »

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

« More »

# IniFileParser¶

Implements an IniFileParser. The logic is coming from th Properties.php, but I don't know who's the author.

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

# InputStream¶

Wrapper class for PHP stream that supports read operations.

« More »

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 »

Abstract class for reading character streams.

« More »

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.

« 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

« More »

Class that allows reading tokens from INI files.

« More »

« More »

# 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 Parameterizable 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 » # AbstractSelectorContainer¶ 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 » # 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 » # ExecutableSelector¶ A selector that selects executable files. « 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 » # MappingSelector¶ A mapping selector is an abstract class adding mapping support to the base 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 » # 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 » # ReadableSelector¶ A selector that selects readable files. « 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 » # SymlinkSelector¶ A selector that selects symbolic links. « 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 » # WritableSelector¶ A selector that selects writable files. « 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 »

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

« More »

Changes the attributes of a file or all files inside specified directories.

Right now it has effect only under Windows. Each of the 4 possible permissions has its own attribute, matching the arguments for the attrib command. Example:  <attrib file="${input}" readonly="true" hidden="true" verbose="true"/>  « 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 » # BlockForTask¶ Based on Apache Ant Block 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 » # 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 explicitly overwrite existing files. Use \Project#createTask to register a new Task. « More » # DeleteTask¶ Deletes a file or directory, or set of files defined by a fileset. Use \Project#createTask to register a new Task. « More » # DependSet¶ Examines and removes out of date target files. If any of the target files are out of date with respect to any of the source files, all target files are removed. This is useful where dependencies cannot be computed (for example, dynamically interpreted parameters or files that need to stay in synch but are not directly linked) or where the phing task in question could compute them but does not. nested arguments: <ul> <li>srcfileset (fileset describing the source files to examine) <li>srcfilelist (filelist describing the source files to examine) <li>targetfileset (fileset describing the target files to examine) <li>targetfilelist (filelist describing the target files to examine) </ul> At least one instance of either a fileset or filelist for both source and target are required. <p> This task will examine each of the source files against each of the target files. If any target files are out of date with respect to any of the source files, all targets are removed. If any files named in a (src or target) filelist do not exist, all targets are removed. Hint: If missing files should be ignored, specify them as include patterns in filesets, rather than using filelists. </p><p> This task attempts to optimize speed of dependency checking. It will stop after the first out of date file is found and remove all targets, rather than exhaustively checking every source vs target combination unnecessarily. </p> « 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 »

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 »

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 »

« More »

# IsFailure¶

Condition to test a return-code for failure.

« More »

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 »

« More »

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 »

# PathConvert¶

Converts path and classpath information to a specific target OS format. The resulting formatted path is placed into the specified property.

« More »

Handles PDO configuration needed by SQL type tasks.

« More »

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 »

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

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 »

# Retry¶

Retries the nested task a set number of times.

« More »

« More »

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 »

<p>A task for sleeping a short period of time, useful when a build or deployment process requires an interval between tasks.</p> <p>A negative value can be supplied to any of attributes provided the total sleep time is positive, pending fundamental changes in physics and PHP execution times.</p> <p>Note that sleep times are always hints to be interpreted by the OS how it feels small times may either be ignored or rounded up to a minimum timeslice. Note also that the system clocks often have a fairly low granularity too, which complicates measuring how long a sleep actually took.</p>
« More »

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

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

Creates a tar archive using PEAR Archive_Tar.

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

Extracts one or several tar archives using PEAR Archive_Tar

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

Extracts one or several zip archives using ZipArchive class.

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

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 »

Publish Wiki document using Wiki API.

« More »

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

« More »

Task for setting properties from an XML file in buildfiles.

« More »

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 »

Creates a zip archive using PHP ZipArchive extension/

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

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

# IsPropertyFalseCondition¶

Checks the value of a specified property.

Returns true if the property evaluates to true.
« More »

# IsPropertyTrueCondition¶

Checks the value of a specified property.

Returns true if the property evaluates to true.
« 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 »

# Matches¶

Simple regular expression condition.

« More »

# NestedCondition¶

Nested conditions.

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

# IoncubeComment¶

« More »

Invokes the ionCube Encoder (PHP4 or PHP5)

« More »

« More »

« More »

# PhpDependLoggerElement¶

« More »

Runs the PHP_Depend software analyzer and metric tool.

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

« More »

« More »

« More »

# PHPLocFormatterFactory¶

A wrapper for the implementations of PHPUnit2ResultFormatter.

« More »

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

« More »

« More »

# PHPLocXMLFormatter¶

« More »

### Classes, interfaces and traits

« More »

Integration/Wrapper for hg archive

« More »

Base task for integrating phing and mercurial.

« More »

Integration/Wrapper for hg clone

« More »

Integration/Wrapper for hg commit

« More »

Integration/Wrapper for hg init

« More »

Integration/Wrapper for hg log

« More »

Integration/Wrapper for hg update

« More »

Integration/Wrapper for hg push

« More »

Integration/Wrapper for hg revert

« More »

Integration/Wrapper for hg tag

« More »

Integration/Wrapper for hg update

« More »

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

« More »

« More »

# PathToFileSet¶

Coverts a path to a fileset.

This is useful 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 »

PropertyCopy

« More »

« More »

« More »

« More »

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

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

# FileNameMapper¶

Interface for filename mapper classes.

« More »

# CompositeMapper¶

A <code>ContainerMapper</code> that unites the results of its constituent <code>FileNameMapper</code>s into a single set of result filenames.

« More »

# CutDirsMapper¶

A mapper that strips of the a configurable number of leading directories from a file name.

« More »

# FirstMatchMapper¶

A <code>ContainerMapper</code> that returns the results of its first constituent <code>FileNameMapper</code>s that matches.

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

« More »

« More »

« More »

# ProjectTimer¶

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

« More »

« More »

« More »

« More »

« More »

« More »

« More »

« More »

« More »

« More »

« More »

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

# JsonLogger¶

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

The default filename is "log.json", but this can be overridden with the property <code>JsonLogger.file</code>.
« 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 »

# ProfileLogger¶

This is a special logger that is designed to profile builds.

Currently, it only writes which targets are being executed, and any messages that get logged.
« 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 »

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

# TimestampedLogger¶

Like a normal logger, except with timed outputs.

Currently, it only writes which targets are being executed, and any messages that get logged.
« 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 »