Interface for build listeners.
Classes that implement a listener must extend this class and (faux)implement all methods that are decleard as dummies below.
Interface for build loggers.
Build loggers are build listeners but with some additional functionality:
Classes that implement a listener must implement this interface.
Condition interface specification:
Each condition must implement a method applying to this prototye:
Interface for elements that want to be able to create custom child elements at runtime.
« More »This is the interface to be used by all custom selectors, those that are called through the <custom> 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 »Contains some shared attributes and methods -- and some abstract methods with engine-specific implementations that sub-classes must override.
« More »An interface used to describe the actions required by any type of directory scanner that supports Selecters.
« More »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.
Abstract interface for objects which can contain tasks (targets) Used to check if a class can contain tasks (via instanceof)
@author Andreas Aderhold andi@binarycloud.com
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:
[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
Abstract Liquibase task. Base class for all Liquibase Phing tasks.
Use \Project#createTask to register a new Task.
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
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.
A class for creating adhoc tasks in build file.
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.
<and> condition container.
Iterates over all conditions and returns false as soon as one evaluates to false.
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)
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 java 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
ApiGen task (http://apigen.org).
Use \Project#createTask to register a new Task.
Appends text, contents of a file or set of files defined by a filelist to a destination file.
OR
OR
Executes a command on the (filtered) file list/set.
(Loosely based on the "Ant Apply" task - http://ant.apache.org/manual/Tasks/apply.html)
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)
An "inner" class for holding assigned var values.
May be need to expand beyond name/value in the future.
The base class for all Tasks.
Use \Project#createTask to register a new Task.
<available> task.
Note: implements condition interface (see condition/Condition.php)
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.
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)
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)
Encapsulates a build specific event.
We have three sources of events all handled by this class:
Events are all fired from the project class by creating an event object using this class and passing it to the listeners.
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.
A phing task for generating output by using Capsule.
This is based on the interface to TexenTask from Apache's Velocity engine.
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" />
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.
Task that changes the permissions on a file/directory.
Use \Project#createTask to register a new Task.
Task that changes the permissions on a file/directory.
Use \Project#createTask to register a new Task.
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.
<someelement>
The element
<acommandline executable="/executable/to/run">
<argument value="argument 1" />
<argument line="argument_1 argument_2 argument_3" />
<argument value="argument 4" />
</acommandline>
</someelement>
someelement
must provide a method
createAcommandline
which returns an instance of this class.
Class to keep track of the position of an Argument.
This class is there to support the srcfile and targetfile elements of <execon> and <transform> - don't know whether there might be additional use cases.
--SBComposer Task Run composer straight from phing
Use \Project#createTask to register a new Task.
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 »"Inner" class for handling enumerations.
Uses build-in PHP5 iterator support.
<condition> task as a generalization of <available>
This task supports boolean logic as well as pluggable conditions to decide, whether a property should be set.
This task does not extend Task to take advantage of ConditionBase.
ConfigurationException is thrown by Phing during the configuration and setup phase of the project.
« More »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.
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.
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.
Merges code coverage snippets into a code coverage database
Use \Project#createTask to register a new Task.
Transforms information in a code coverage database to XML
Use \Project#createTask to register a new Task.
Transform a Phing/Xdebug code coverage xml report.
The default transformation generates an html report in framed style.
Initializes a code coverage database
Use \Project#createTask to register a new Task.
Stops the build if any of the specified coverage threshold was not reached
Use \Project#createTask to register a new Task.
Executes a series of SQL statements on a database using Creole.
Statements can either be read in from a text file using the src attribute or from between the enclosing SQL tags.
Multiple statements can be provided, separated by semicolons (or the defined delimiter). Individual lines within the statements can be commented using either --, // or REM at the start of the line.
The autocommit 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.
The onerror attribute specifies how to proceed when an error occurs during the execution of one of the statements. The possible values are: continue execution, only show the error; stop execution and commit transaction; and abort execution and transaction and fail task.
Handles Creole configuration needed by SQL type tasks.
Use \Project#createTask to register a new Task.
Adds an new entry to a CVS password file.
Use \Project#createTask to register a new Task.
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.
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)
Configures a Project (complete with Targets and Tasks) based on a XML build file.
Design/ZE2 migration note: If PHP would support nested classes. All the phing/parser/*Filter classes would be nested within this class
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.
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="">
Writes a build event to the console.
Currently, it only writes which targets are being executed, and any messages that get logged.
Splits SQL source into queries using simple regular expressions
Extracted from PDOSQLExecTask::runStatements()
Deletes a file or directory, or set of files defined by a fileset.
Use \Project#createTask to register a new Task.
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)
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.
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 <description> 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.
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.
Subclass as hint for supporting tasks that the included directories instead of files should be used.
TODO:
[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
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.
Class that represents the execution of a single task within a parallelized frame.
« More »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).
Echos a message to the logging system or to a file
Use \Project#createTask to register a new Task.
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.
"Inner" class for IfTask.
This class has same basic structure as the IfTask, although of course it doesn't support
A simple string comparator. Compares two strings for eqiality in a binary safe manner. Implements the condition interface specification.
« More »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)
Expands Phing Properties, if any, in the data.
Example:
Or:
« More »
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.
Saves currently defined properties into a specified file
Use \Project#createTask to register a new Task.
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.
Base class for extracting tasks such as Unzip and Untar.
This is very closely based on the ANT class of the same name.
Exits the active build, giving an additional message if available.
Use \Project#createTask to register a new Task.
fileHash
Calculate either MD5 or SHA hash value of a specified file and retun the value in a property
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)
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.
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.
Moved out of MatchingTask to make it a standalone object that could be referenced (by scripts for example).
TODO:
[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
fileHash
Calculate either MD5 or SHA hash value of a specified file and retun the value in a property
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:
This is extended from Federico's original code, all his docs are kept in here below.
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:
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.
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)
<foreach> task
Task definition for the foreach task. This task takes a list with delimited values, and executes a target with set param.
Usage:
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 ",".
Wrapper around git-checkout
Use \Project#createTask to register a new Task.
Repository initialization task
Use \Project#createTask to register a new Task.
Reads the first <code>n</code> lines of a stream.
(Default is first 10 lines.)
Example:
Or:
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 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_classname HtmlColorLogger.WARNING_CLASS=_your_css_classname HtmlColorLogger.INFO_CLASS=_your_css_classname HtmlColorLogger.VERBOSE_CLASS=_your_css_classname HtmlColorLogger.DEBUG_CLASS=_your_css_classname
This stems from the Ansi Color Logger done by Hans Lellelid:
A HTTP download task.
Downloads a file via HTTP GET method and saves it to a specified directory
A HTTP request task.
Making an HTTP request and try to match the response against an provided regular expression.
Base class for HTTP_Request2-backed tasks
Handles nested
Encode data from <code>in</code> encoding to <code>out</code> encoding.
Example:
Or:
Perform some tasks based on whether a given condition holds true or not.
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.
This task doesn't have any attributes, the condition to test is
specified by a nested element - see the documentation of your
Just like the
In addition to the condition, you can specify three different
child elements,
The
Use the following task to define the
<taskdef name="if" classname="net.sf.antcontrib.logic.IfTask" />
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.
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.
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.
Reads input from the InputHandler.
Use \Project#createTask to register a new Task.
Helper class that collects the methods that a task or nested element holds to set attributes, create nested elements or hold PCDATA elements.
Invokes the ionCube Encoder (PHP4 or PHP5)
Use \Project#createTask to register a new Task.
Invokes the ionCube "make_license" program
Use \Project#createTask to register a new Task.
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.
Task to minify javascript files.
Requires JShrink (https://github.com/tedivm/JShrink) which can be installed using composer
Filter which includes only those lines that contain all the user-specified strings.
Example:
Or:
This will include only those lines that contain foo
and
bar
.
Filter which includes only those lines that contain the user-specified regular expression matching strings.
Example:
Or:
This will fetch all those lines that contain the pattern foo
Task to create a changelog file.
Use \Project#createTask to register a new Task.
Task to create a javadoc-like documentation based on current database and changelog.
Use \Project#createTask to register a new Task.
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.
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)
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)
Rollbacks the database changes.
Use \Project#createTask to register a new Task.
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.
Task for running liquibase commands that doesn't have their own commands yet.
Parameters can be provided by nested
Task to update the database to latest version of the changelog file.
Use \Project#createTask to register a new Task.
LoadFileTask
Loads a (text) file and stores the contents in a property. Supports filterchains.
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.
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)
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:
<fileset refid="files_build" />
<fileset refid="files_build" />
Filename Mapper maps source file name(s) to target file name(s).
Built-in mappers can be accessed by specifying they "type" attribute:
Custom mappers can be specified by providing a dot-path to a include_path-relative
class:
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.
For merging files into a single file. In practice just returns whatever value was set for "to".
« 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.
Extends DefaultLogger to strip out empty targets.
Currently, it only writes which targets are being executed, and any messages that get logged.
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)
<not> condition.
Evaluates to true if the single condition nested into it is false and vice versa.
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)
<or> condition container.
Iterates over all conditions and returns true as soon as one evaluates to true.
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)
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.
Convert dot-notation packages to relative paths.
Use \Project#createTask to register a new Task.
Uses the DocBlox_Parallel library to run nested Phing tasks concurrently.
WARNING: this task is highly experimental!
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)
Patches a file by applying a 'diff' file to it
Requires "patch" to be on the execution 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?
<sometask>
<somepath>
<pathelement location="/path/to/file" />
<pathelement path="/path/to/class2;/path/to/class3" />
<pathelement location="/path/to/file3" />
</somepath>
</sometask>
The object implemention sometask
must provide a method called
createSomepath
which returns an instance of Path
.
Nested path definitions are handled by the Path object and must be labeled
pathelement
.
The path element takes a parameter path
which will be parsed
and split into single elements. It will usually be used
to define a path from an environment variable.
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 '\'.
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)
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.
Executes a series of SQL statements on a database using PDO.
Statements can either be read in from a text file using the src attribute or from between the enclosing SQL tags.
Multiple statements can be provided, separated by semicolons (or the defined delimiter). Individual lines within the statements can be commented using either --, // or REM at the start of the line.
The autocommit 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.
The onerror attribute specifies how to proceed when an error occurs during the execution of one of the statements. The possible values are: continue execution, only show the error; stop execution and commit transaction; and abort execution and transaction and fail task.
"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.
Handles PDO configuration needed by SQL type tasks.
Use \Project#createTask to register a new Task.
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().
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:
phing -f build.xml -logger phing.listener.PearLogger -Dpear.log.type=file -Dpear.log.name=/path/to/log.log
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
The
or
The
Here's an over-simple example of how this could be used:
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.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.
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
The
or
The
Here's an over-simple example of how this could be used:
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.Handles complex options <mapping> elements which are hashes (assoc arrays).
« More »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.
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.
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.
Call another target in the same project.
This only works as expected if neither property1 nor foo are defined in the project itself.
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)
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.
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.
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:
See {@link http://phk.tekwire.net/} for more information about PHK.
Use \Project#createTask to register a new Task.
A PHP code sniffer task. Checking the style of one or more PHP source files.
Use \Project#createTask to register a new Task.
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)
This abstract class describes classes that format the results of a PHPCPD run.
« More »Runs PHP Copy & Paste Detector. Checking PHP files for duplicated code.
Refactored original PhpCpdTask provided by Timo Haberkern timo.haberkern@fantastic-bits.de
Runs the PHP_Depend software analyzer and metric tool.
Performs static code analysis on a given source base.
PhpDocumentor2 Task (http://www.phpdoc.org) Based on the DocBlox Task
Use \Project#createTask to register a new Task.
Wrapper around PhpDocumentor2 (so we retain PHP 5.2 compatibility in the main task)
« More »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.
Task to run PhpDocumentor.
Use \Project#createTask to register a new Task.
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.
A PHP lint task. Checking syntax of one or more PHP source file.
Use \Project#createTask to register a new Task.
Runs phploc a tool for quickly measuring the size of PHP projects.
Use \Project#createTask to register a new Task.
Runs PHP Mess Detector. Checking PHP files for several potential problems based on rulesets.
Use \Project#createTask to register a new Task.
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.
This abstract class describes classes that format the results of a PHPUnit testrun.
« More »PREG Regexp Engine.
Implements a regexp engine using PHP's preg_match(), preg_match_all(), and preg_replace() functions.
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)
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.
Abstract class providing properties and methods common to all the project components
« More »The datatype handler class.
This class handles the occurance of registered datatype tags like FileSet
Handler class for the <project> XML element This class handles all elements under the <project> element.
« More »Convenience class for reading and writing property files.
FIXME
- Add support for arrays (separated by ',')
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.
Task for setting properties in buildfiles.
Use \Project#createTask to register a new Task.
Class to hold a property value Class only required to make it possible to add a property as reference
« More »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.
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:
The task/type must provide a supporting setter for the attribute:
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);
}
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)
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.
<replaceregexp file="${src}/build.properties"
match="OldProperty=(.*)"
replace="NewProperty=\1"
byline="true"/>
Replaces tokens in the original input with user-supplied values.
Example:
;
Or:
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:
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.
Example:
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.
TODO:
- Possibly integrate this with PackageAsPath, for handling/resolving dot-path paths.
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.
Wrapper class that holds the attributes of a Task (or elements nested below that level) and takes care of configuring that element at runtime.
SMART-UP INLINE DOCS
Downloads an object off S3
Provides common methods and properties to all of the S3 tasks
Stores an object on S3
Provides common methods and properties to all of the S3 tasks
Copy files to and from a remote host using scp.
Use \Project#createTask to register a new Task.
<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.
This is a Singleton.
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)
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.
Abstract Service_Amazon class.
Implements common methods & properties used by all Amazon services
Abstract Service_Amazon_S3 class.
Provides common methods and properties to all of the S3 tasks
Prints plain text output of the test to a specified Writer.
« More »Child class of "FormatterElement", overrides setType to provide other formatter classes for SimpleTest
« More »Prints plain text output of the test to a specified Writer.
« More »This abstract class describes classes that format the results of a SimpleTest testrun.
« More »Prints short summary output of the test to Phing's logging system.
« More »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.
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?
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.
"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.
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 »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)
Execute commands on a remote host using ssh.
Use \Project#createTask to register a new Task.
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").
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.
Prints short summary output of the test to Phing's logging system.
« More »Base class for Subversion tasks
Use \Project#createTask to register a new Task.
Checks out a repository to a local directory
Use \Project#createTask to register a new Task.
Commits changes in a local working copy to the repository
Use \Project#createTask to register a new Task.
Copies a repository from the repository url to another
Use \Project#createTask to register a new Task.
Exports/checks out a repository to a local directory with authentication
Use \Project#createTask to register a new Task.
Parses the output of 'svn info --xml' and
Use \Project#createTask to register a new Task.
Stores the number of the last revision of a workingcopy in a property
Use \Project#createTask to register a new Task.
Stores the output of a list command on a workingcopy or repositoryurl in a property.
This stems from the SvnLastRevisionTask.
Stores the output of a log command on a workingcopy or repositoryurl in a property.
This stems from the SvnLastRevisionTask.
Switches a repository at a given local directory to a different location
Use \Project#createTask to register a new Task.
Updates a repository in local directory
Use \Project#createTask to register a new Task.
Generates symlinks based on a target / link combination.
Can also symlink contents of a directory, individually
Single target symlink example:
<symlink target="/some/shared/file" link="${project.basedir}/htdocs/my_file" />
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/
<symlink link="${project.basedir}/library">
<fileset dir="/my/shared/library">
<include name="*" />
</fileset>
</symlink>
Reads the last <code>n</code> lines of a stream. (Default is last10 lines.)
Example:
Or:
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.
The Target component. Carries all required target data. Implements the abstract class {@link TaskContainer}
« More »The target handler class.
This class handles the occurance of a
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 java 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
Creates a tar archive using PEAR Archive_Tar.
This is very closely based on the ANT class of the same name.
Use introspection to "adapt" an arbitrary ( not extending Task, but with similar patterns).
Use \Project#createTask to register a new Task.
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.
. .
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)
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);
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.
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.
Example:
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.
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.
.
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)
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.
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:
Wrapper class that holds all information necessary to create a task that did not exist when Phing started.
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.
Extracts one or several tar archives using PEAR Archive_Tar
This is very closely based on the ANT class of the same name.
Extracts one or several zip archives using ZipArchive class.
This is very closely based on the ANT class of the same name.
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.
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.
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.
Simple task to echo a warning message (Project::MSG_WARN) to all output devices.
Use \Project#createTask to register a new Task.
Publish Wiki document using Wiki API.
Use \Project#createTask to register a new Task.
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:
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:
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.
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 XmlLogger.file
.
XML formatter for PDO results.
This class reprsents the output of a query using a simple XML schema.
The actual names of the colums will depend on the fetchmode that was used with PDO.
Task for setting properties from an XML file in buildfiles.
Use \Project#createTask to register a new Task.
Implements an XSLT processing filter while copying files.
This is a shortcut for calling the
ZendCodeAnalyzerTask analyze PHP source code using the ZendCodeAnalyzer included in Zend Studio 5.1
Available warnings: zend-error - %s(line %d): %s oneline-comment - One-line comment ends with tag. bool-assign - Assignment seen where boolean expression is expected. Did you mean '==' instead of '='? bool-print - Print statement used when boolean expression is expected. bool-array - Array used when boolean expression is expected. bool-object - Object used when boolean expression is expected. call-time-ref - Call-time reference is deprecated. Define function as accepting parameter by reference instead. if-if-else - In if-if-else construction else relates to the closest if. Use braces to make the code clearer. define-params - define() requires two or three parameters. define-const - First parameter for define() should be string. Maybe you forgot quotes? break-var - Break/continue with variable is dangerous - break level can be out of scope. break-depth - Break/continue with depth more than current nesting level. var-once - Variable '%s' encountered only once. May be a typo? var-arg-unused - Function argument '%s' is never used. var-global-unused - Global variable '%s' is defined but never used. var-use-before-def - Variable '%s' is used before it was assigned. var-use-before-def-global - 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. var-no-global - PHP global variable '%s' is used as local. Maybe you wanted to define '%s' as global? var-value-unused - Value assigned to variable '%s' is never used var-ref-notmodified - Function parameter '%s' is passed by reference but never modified. Consider passing by value. return-empty-val - Function '%s' has both empty return and return with value. return-empty-used - Function '%s' has empty return but return value is used. return-noref - Function '%s' returns reference but the value is not assigned by reference. Maybe you meant '=&' instead of '='? return-end-used - Control reaches the end of function '%s'(file %s, line %d) but return value is used. sprintf-miss-args - Missing arguments for sprintf: format reqires %d arguments but %d are supplied. sprintf-extra-args - Extra arguments for sprintf: format reqires %d arguments but %d are supplied. unreach-code - Unreachable code in function '%s'. include-var - include/require with user-accessible variable can be dangerous. Consider using constant instead. non-object - Variable '%s' used as object, but has different type. bad-escape - Bad escape sequence: \%c, did you mean \%c? empty-cond - Condition without a body expr-unused - Expression result is never used
Encodes files using Zeng Guard Encoder
This is very closely based on the ANT class of the same name.
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.
Produce license files using Zeng Guard.
The task can produce a license file from the given license properties or it can use a template.