# 6.6 Writing Tasks
6.6.1 Creating A Task
We will start creating a rather simple task which basically does nothing more than echo a message to the screen. See \[below\] for the source code and the following \[below\] for the XML definition that is used for this task.
```
<?php
require_once "phing/Task.php";
class MyEchoTask extends Task {
/**
* The message passed in the buildfile.
*/
private $message = null;
/**
* Whether to reverse the message, for fun?
*/
private $reverse = false;
/**
* The setter for the attribute "message"
*/
public function setMessage($str) {
$this->message = $str;
}
public function setReverse($str) {
$this->reverse = StringHelper::booleanValue($str);
}
/**
* The init method: Do init steps.
*/
public function init() {
// nothing to do here
}
/**
* The main entry point method.
*/
public function main() {
if ($this->reverse) {
print(strrev($this->message));
} else {
print($this->message);
}
}
}
?>
```
This code contains a rather simple, but complete Phing task. It is assumed that the file is named `MyEchoTask.php`. For this example, we're assuming that the file is placed in `/home/example/classes`. We'll explain the source code in detail shortly. But first we'd like to discuss how we should register the task to Phing so that it can be executed during the build process.
6.6.2 Using the Task
The task shown \[above\] must somehow get loaded and called by Phing. Therefore it must be made available to Phing so that the buildfile parser is aware a correlating XML element and it's parameters. Have a look at the minimalistic buildfile example given in \[the buildfile below\] that does exactly this.
```
<?xml version="1.0" ?>
<project name="test" basedir="." default="test.myecho">
<includepath classpath="/home/example/classes" />
<taskdef name="myecho" classname="MyEchoTask" />
<target name="test.myecho">
<myecho message="Hello World" reverse="yes"/>
</target>
</project>
```
To register the custom task with Phing, the `taskdef` element (line 5) is used. See [Section聽B.43](apbs43.html "B.43 TaskdefTask") for a more detailed explanation. Optionally, before the `taskdef` element, the `includepath` element adds a path to PHP's include path. This is of course only required if the mentioned path isn't already on the include path. See [Section聽B.24](apbs24.html "B.24 IncludePathTask") for a more detailed explanation.
Now, as we have registered the task by assigning a name and the worker class (\[see source code above\]) it is ready for usage within the `<target>` context (line 8). You see that we pass the message that our task should echo to the screen via an XML attribute called "message".
And for fun, if the "reverse" attribute is set to a "truth-like" value, the message will be reversed when displayed. So we get "dlroW olleH" displayed instead!
6.6.3 Source Discussion
Now that you've got the knowledge to execute the task in a buildfile it's time to discuss how everything works.
6.6.4 Task Structure
All files containing the definition of a task class follow a common well formed structure:
- Include/require statements to import all required classes
- The class declaration and definition
- The class's properties
- The class's constructor
- Setter methods for each XML attribute
- The `init()` method
- The `main()` method
- Arbitrary `private` (or `protected`)` `class methods
6.6.5 Includes
Always include/require all the classes needed for this task in full written notation. Furthermore you should always include `phing/Task.php` at the very top of your include block. Then include all other required system or proprietary classes.
6.6.6 Class Declaration
If you look at line 5 in \[the source code of the task\] you will find the `class declaration`. This will be familiar to you if you are experienced with OOP in PHP (we assume here that you are). Furthermore there are some fine-grained rules you must obey when creating the classes (see also,\[naming and coding standards\]):
- Your classname must be exactly like the taskname you are going to implement plus the suffix "Task". In our example case the classname is `MyEchoTask` (constructed by the taskname "`myecho`" plus the suffix "`task`"). The upper/lower case casing is currently only for better reading. However, it is encouraged that you use it this way.
- The task class you are creating must at least extend "`Task`" to inherit all task specific methods.
6.6.7 Class Properties
The next lines you are coding are class properties. Most of them are inherited from the Task superclass, so there's not need to redeclare them. Nevertheless you should `declare` the following ones yourself:
- Taskname. Always hard code the `taskname` property that equals the name of the XML element that your task claims. Currently this information is not used - but it will be in the future.
- Your arbitrary properties that reflect the XML attributes/elements which your task accepts.
In the `MyEchoTask` example the coded properties can be found in lines 7 to 11. Give you properties meaningful descriptive names that clearly state their function within the context. A couple of properties are inherited from the superclass that must not be declared in the properties part of the code.
For a list of inherited properties (most of them are reserved, so be sure not to overwrite them with your own) can be found in the "Phing API Reference" in the `docs/api/` directory.
6.6.8 The Constructor
The next block that follows is the class's constructor. It must be present and call at least the constructor or the parent class. Of course, you can add some initialization data here. It is recommended that you `define` your prior declared properties here.
6.6.9 Setter Methods
As you can see in the XML definition of our task (\[see buildfile above\] , line 9) there is an attribute defined with the task itself, namely "message" with a value of the text string that our task should echo. The task must somehow become aware of the attribute name and the value. Therefore the `setter methods` exist.
For each attribute you want to import to the task's namespace you have to define a method named exactly after the very attribute plus the string "set" prepended. This method accepts exactly one parameter that holds the value of the attribute. Now you can set the a class internal property to the value that is passed via the setter method.
In the setter method you should also perform any casting operations and/or check if the attribute value is a valid value. If this is not the case, throw a `BuildException`. In some cases, such as when you have three attributes and at least one of them should be set, you may want to check the attribute values inside the init() or main() method.
In our example the setter is named `setMessage` , because the XML attribute the echo task accepts is "message". setMessage now takes the string "Hello World" provided by the parser and sets the value of the internal class property `$strMessage` to "Hello World". It is now available to the task for further disposal.
There is also another setter named `setReverse`.This uses the StringHelper::toBoolean static function to convert truthy values to a true/false value. This helps keep our own code nice and simple.
6.6.10 Creator Methods
Creator methods allow you to manage nested XML tags in your new Phing Task.
For example, you might be developing a task that would contain a nested "color" XML tag. In this instance a creator method named `createcolor` would be required.
```
<tag>
<color red="..." green="..." blue="...">
</tag>
```
If the XML for the task and the subtag look like the above, the PHP code for it could look something like the following:
```
class TagTask extends Task
{
protected $colors = array();
public function createColor()
{
$colorObj = new TagColor();
$this->colors[] = $colorObj;
return $colorObj;
}
}
class TagColor
{
public function setRed($value)
{
}
public function setGreen($value)
{
}
public function setBlue($value)
{
}
}
```
6.6.11 `init()` Method
The `init` method gets called when the `<taskname>` xml element closes. It must be implemented even if it does nothing like in the example above. You can do init steps here required to setup your task object properly. After calling the Init-Method the task object remains untouched by the parser. Init should not perform operations related somehow to the action the task performs. An example of using init may be cleaning up the $strMessage variable in our example (i.e. `trim($strMessage)`) or importing additional workers needed for this task.
The init method should return true or an error object evaluated by the governing logic. If you don't implement init method, phing will shout down with a fatal error.
6.6.12 `main()` Method
There is exactly one entry point to execute the task. It is called after the complete buildfile has been parsed and all targets and tasks have been scheduled for execution. From this point forward the very implementation of the tasks action starts. In case of our example a message (imported by the proper setter method) is Logged to the screen through the system's "Logger" service (the very action this task is written for). The `Log()` method-call in this case accepts two parameters: a event constant and the message to log.
6.6.13 Arbitrary Methods
For the more or less simple cases (as our example) all the logic of the task is coded in the Main() method. However for more complex tasks common sense dictates that particular action should be swapped to smaller, logically contained units of code. The most common way to do this is separating logic into private class methods - and in even more complex tasks in separate libraries.
```
private function myPrivateMethod() {
// definition
}
```
- Phing User Guide
- Preface
- 1. About this book
- 1.1. Authors
- 1.2. Copyright
- 1.3. License
- 1.4. DocBook
- 1.4.1. Building the documentation
- 1.4.2. Template for new tasks
- 1.4.3. Customization of the look & feel of the rendered outputs
- 1.4.4. DocBook v5 elements used in the manual and their meaning
- 2. Introduction
- 2.1. What Phing Is
- 2.2. Phing & Binarycloud: History
- 2.3. How Phing Works
- 2.4. Cool, so how can I help?
- 2.4.1. Participating in the development
- 3. Setting-up Phing
- 3.1. System Requirements
- 3.1.1. Operating Systems
- 3.1.2. Software Dependencies
- 3.2. Obtaining Phing
- 3.2.1. Distribution Files
- 3.2.2. Getting the latest source from Phing Git repository
- 3.3. Composer Install
- 3.4. Phar package
- 3.5. Running Phing
- 3.5.1. Command Line
- 3.5.2. Supported command line arguments
- 4. Getting started
- 4.1. XML And Phing
- 4.2. Writing A Simple Buildfile
- 4.2.1. Project Element
- 4.2.2. Target Element
- 4.2.2.1. Target attributes
- 4.2.3. Task Elements
- 4.2.4. Property Element
- 4.2.4.1. Built-in Properties
- 4.3. More Complex Buildfile
- 4.3.1. Handling source dependencies
- 4.4. Relax NG Grammar
- 5. Project components
- 5.1. Projects
- 5.2. Version
- 5.3. Project Components in General
- 5.4. Targets
- 5.5. Tasks
- 5.6. Types
- 5.6.1. Basics
- 5.6.2. Referencing Types
- 5.7. Basic Types
- 5.7.1. FileSet
- 5.7.2. FileList
- 5.7.3. FilterChains and Filters
- 5.7.4. File Mappers
- 5.8. Conditions
- 5.8.1. not
- 5.8.2. and
- 5.8.3. or
- 5.8.4. xor
- 5.8.5. os
- 5.8.6. equals
- 5.8.7. versioncompare
- 5.8.8. http
- 5.8.9. socket
- 5.8.10. hasfreespace
- 5.8.11. isset
- 5.8.12. contains
- 5.8.13. istrue
- 5.8.14. isfalse
- 5.8.15. ispropertytrue
- 5.8.16. ispropertyfalse
- 5.8.17. referenceexists
- 5.8.18. available
- 5.8.19. filesmatch
- 5.8.20. isfileselected
- 5.8.21. isfailure
- 5.8.22. matches
- 6. Extending Phing
- 6.1. Extension Possibilities
- 6.1.1. Tasks
- 6.1.2. Types
- 6.1.3. Mappers
- 6.2. Source Layout
- 6.2.1. Files And Directories
- 6.2.2. File Naming Conventions
- 6.2.3. Coding Standards
- 6.3. System Initialization
- 6.3.1. Wrapper Scripts
- 6.3.2. The Main Application (phing.php)
- 6.3.3. The Phing Class
- 6.4. System Services
- 6.4.1. The Exception system
- 6.5. Build Lifecycle
- 6.5.1. How Phing Parses Buildfiles
- 6.6. Writing Tasks
- 6.6.1. Creating A Task
- 6.6.2. Using the Task
- 6.6.3. Source Discussion
- 6.6.4. Task Structure
- 6.6.5. Includes
- 6.6.6. Class Declaration
- 6.6.7. Class Properties
- 6.6.8. The Constructor
- 6.6.9. Setter Methods
- 6.6.10. Creator Methods
- 6.6.11. init() Method
- 6.6.12. main() Method
- 6.6.13. Arbitrary Methods
- 6.7. Writing Types
- 6.7.1. Creating a DataType
- 6.7.2. Using the DataType
- 6.7.3. Source Discussion
- 6.7.3.1. Getters & Setters
- 6.7.3.2. The getRef() Method
- 6.8. Writing Mappers
- 6.8.1. Creating a Mapper
- 6.8.2. Using the Mapper
- A. Fact Sheet
- A.1. Built-In Properties
- A.2. Command Line Arguments
- A.3. Distribution File Layout
- A.4. Program Exit Codes
- A.5. The LGPL License
- A.6. The GFDL License
- B. Core tasks
- B.1. AdhocTaskdefTask
- B.1.1. Examples
- B.2. AdhocTypedefTask
- B.2.1. Example
- B.3. AppendTask
- B.3.1. Examples
- B.3.2. Supported Nested Tags
- B.4. ApplyTask
- B.4.1. Examples
- B.4.2. Supported Nested Tags
- B.5. AttribTask
- B.5.1. Example
- B.5.2. Supported Nested Tags
- B.6. AvailableTask
- B.6.1. Examples
- B.7. Basename
- B.7.1. Examples
- B.8. ChmodTask
- B.8.1. Examples
- B.8.2. Supported Nested Tags
- B.9. ChownTask
- B.9.1. Examples
- B.9.2. Supported Nested Tags
- B.10. ConditionTask
- B.10.1. Examples
- B.10.2. Supported Nested Tags
- B.11. CopyTask
- B.11.1. Examples
- B.11.2. Supported Nested Tags
- B.12. DefaultExcludes
- B.12.1. Examples
- B.13. DeleteTask
- B.13.1. Examples
- B.13.2. Supported Nested Tags
- B.14. DependSet
- B.14.1. Examples
- B.14.2. Supported Nested Tags
- B.15. Diagnostics
- B.15.1. Example
- B.16. Dirname
- B.16.1. Example
- B.17. EchoTask
- B.17.1. Examples
- B.17.2. Supported Nested Tags
- B.18. EchoPropertiesTask
- B.18.1. Example
- B.19. ExecTask
- B.19.1. Examples
- B.19.2. Supported Nested Tags
- B.20. FailTask
- B.20.1. Examples
- B.20.2. Parameters specified as nested elements.
- B.21. ForeachTask
- B.21.1. Examples
- B.21.2. Supported Nested Tags
- B.22. IfTask
- B.22.1. Examples
- B.23. ImportTask
- B.23.1. Target Overriding
- B.23.2. Special Properties
- B.23.3. Resolving Files Against the Imported File
- B.23.4. Examples
- B.24. IncludePathTask
- B.24.1. Examples
- B.25. InputTask
- B.25.1. Examples
- B.26. LoadFileTask
- B.26.1. Examples
- B.26.2. Supported Nested Tags:
- B.27. MkdirTask
- B.27.1. Examples
- B.28. MoveTask
- B.28.1. Examples
- B.28.2. Attributes and Nested Elements
- B.29. PathConvert
- B.30. PhingTask
- B.30.1. Examples
- B.30.2. Supported Nested Tags
- B.30.3. Base directory of the new project
- B.31. PhingCallTask
- B.31.1. Examples
- B.31.2. Supported Nested Tags
- B.32. Phingversion
- B.32.1. Example
- B.33. PhpEvalTask
- B.33.1. Examples
- B.33.2. Supported Nested Tags
- B.34. PropertyTask
- B.34.1. Examples
- B.34.2. Supported Nested Tags:
- B.35. PropertyPromptTask
- B.35.1. Examples
- B.36. Record
- B.36.1. Example
- B.37. ReflexiveTask
- B.37.1. Examples
- B.37.2. Supported Nested Tags:
- B.38. ResolvePathTask
- B.38.1. Examples
- B.39. Retry
- B.39.1. Example
- B.40. RunTargetTask
- B.40.1. Example
- B.41. SleepTask
- B.41.1. Example
- B.42. SwitchTask
- B.42.1. Supported Nested Tags
- B.42.2. Examples
- B.43. TaskdefTask
- B.43.1. Examples
- B.43.2. Supported Nested Tags
- B.44. Tempfile Task
- B.44.1. Example
- B.45. TouchTask
- B.45.1. Examples
- B.45.2. Supported Nested Tags
- B.46. TruncateTask
- B.46.1. Examples
- B.47. TryCatchTask
- B.47.1. Examples
- B.48. TstampTask
- B.48.1. Examples
- B.48.2. Supported Nested Tags
- B.49. TypedefTask
- B.49.1. Examples
- B.49.2. Supported Nested Tags
- B.50. UpToDateTask
- B.50.1. Examples
- B.50.2. Supported Nested Tags
- B.51. WaitForTask
- B.51.1. Examples
- B.51.2. Supported Nested Tags
- B.52. XsltTask
- B.52.1. Examples
- B.52.2. Supported Nested Tags
- C. Optional tasks
- C.1. ApiGenTask
- C.1.1. Example
- C.2. AutoloaderTask
- C.2.1. Example
- C.3. ComposerTask
- C.3.1. Supported Nested Tags
- C.4. CoverageMergerTask
- C.4.1. Example
- C.4.2. Supported Nested Tags
- C.5. CoverageReportTask
- C.5.1. Example
- C.5.2. Supported Nested Tags
- C.6. CoverageSetupTask
- C.6.1. Example
- C.6.2. Supported Nested Tags
- C.7. CoverageThresholdTask
- C.7.1. Example
- C.7.2. Supported Nested Tags
- C.8. DbDeployTask
- C.8.1. Example
- C.9. ExportPropertiesTask
- C.9.1. Example
- C.10. FileHashTask
- C.10.1. Example
- C.11. FileSizeTask
- C.11.1. Example
- C.12. FileSyncTask
- C.12.1. Examples
- C.13. FtpDeployTask
- C.13.1. Example
- C.13.2. Supported Nested Tags
- C.14. GitArchiveTask
- C.14.1. Example
- C.15. GitBranchTask
- C.15.1. Example
- C.16. GitCheckoutTask
- C.16.1. Example
- C.17. GitCloneTask
- C.17.1. Example
- C.18. GitCommitTask
- C.18.1. Example
- C.18.2. Supported Nested Tags
- C.19. GitFetchTask
- C.19.1. Example
- C.20. GitGcTask
- C.20.1. Example
- C.21. GitInitTask
- C.21.1. Example
- C.22. GitLogTask
- C.22.1. Example
- C.23. GitMergeTask
- C.23.1. Example
- C.24. GitPullTask
- C.24.1. Example
- C.25. GitPushTask
- C.25.1. Example
- C.26. GitTagTask
- C.26.1. Example
- C.27. GitDescribeTask
- C.27.1. Example
- C.28. GrowlNotifyTask
- C.28.1. Examples
- C.29. HgAddTask
- C.29.1. Example
- C.29.2. Supported Nested Tags
- C.30. HgArchiveTask
- C.30.1. Example
- C.31. HgCloneTask
- C.31.1. Example
- C.32. HgCommitTask
- C.32.1. Example
- C.33. HgInitTask
- C.33.1. Example
- C.34. HgLogTask
- C.34.1. Example
- C.35. HgPullTask
- C.35.1. Example
- C.36. HgPushTask
- C.36.1. Example
- C.37. HgRevertTask
- C.37.1. Example
- C.38. HgTagTask
- C.38.1. Example
- C.39. HgUpdateTask
- C.39.1. Example
- C.40. HipchatTask
- C.40.1. Example
- C.41. HttpGetTask
- C.41.1. Example
- C.41.2. Supported Nested Tags
- C.41.3. Global configuration
- C.42. HttpRequestTask
- C.42.1. Example
- C.42.2. Supported Nested Tags
- C.42.3. Global configuration
- C.43. IniFileTask
- C.43.1. Supported Nested Tags
- C.43.2. Example
- C.44. IoncubeEncoderTask
- C.44.1. Example
- C.44.2. Supported Nested Tags
- C.45. IoncubeLicenseTask
- C.45.1. Example
- C.45.2. Supported Nested Tags
- C.46. JsHintTask
- C.46.1. Example
- C.46.2. Supported Nested Tags
- C.47. JslLintTask
- C.47.1. Example
- C.47.2. Supported Nested Tags
- C.48. JsMinTask
- C.48.1. Example
- C.48.2. Supported Nested Tags
- C.49. JsonValidateTask
- C.49.1. Example
- C.50. LiquibaseTask
- C.50.1. Example
- C.50.2. Supported Nested Tags
- C.51. LiquibaseChangeLogTask
- C.51.1. Example
- C.51.2. Supported Nested Tags
- C.52. LiquibaseDbDocTask
- C.52.1. Example
- C.52.2. Supported Nested Tags
- C.53. LiquibaseDiffTask
- C.53.1. Example
- C.53.2. Supported Nested Tags
- C.54. LiquibaseRollbackTask
- C.54.1. Example
- C.54.2. Supported Nested Tags
- C.55. LiquibaseTagTask
- C.55.1. Example
- C.55.2. Supported Nested Tags
- C.56. LiquibaseUpdateTask
- C.56.1. Example
- C.56.2. Supported Nested Tags
- C.57. MailTask
- C.57.1. Example
- C.57.2. Supported Nested Tags
- C.58. ManifestTask
- C.58.1. Supported Nested Tags
- C.59. NotifySendTask
- C.60. PackageAsPathTask
- C.60.1. Example
- C.61. ParallelTask
- C.61.1. Example
- C.62. PatchTask
- C.62.1. Example
- C.63. PathToFileSetTask
- C.63.1. Examples
- C.64. PDOSQLExecTask
- C.64.1. Example
- C.64.2. Supported Nested Tags
- C.65. PearPackageTask
- C.65.1. Example
- C.65.2. Supported Nested Tags
- C.66. PearPackage2Task
- C.66.1. Example
- C.66.2. Supported Nested Tags
- C.67. PharDataTask
- C.67.1. Example
- C.67.2. Supported Nested Tags
- C.68. PharPackageTask
- C.68.1. Example
- C.68.2. Supported Nested Tags
- C.69. PhkPackageTask
- C.69.1. Example
- C.69.2. Supported Nested Tags
- C.70. PhpCodeSnifferTask
- C.70.1. Examples
- C.70.2. Supported Nested Tags
- C.71. PHPCPDTask
- C.71.1. Examples
- C.71.2. Supported Nested Tags
- C.72. PHPLocTask
- C.72.1. Examples
- C.72.2. Supported Nested Tags
- C.73. PHPMDTask
- C.73.1. Example
- C.73.2. Supported Nested Tags
- C.74. PhpDependTask
- C.74.1. Example
- C.74.2. Supported Nested Tags
- C.75. PhpDocumentor2Task
- C.75.1. Example
- C.75.2. Supported Nested Tags
- C.76. PhpLintTask
- C.76.1. Example
- C.76.2. Supported Nested Tags
- C.77. PHPUnitTask
- C.77.1. Supported Nested Tags
- C.77.2. Example
- C.77.3. Supported Nested Tags
- C.78. PHPUnitReport
- C.78.1. Example
- C.79. PropertyCopy
- C.79.1. Example
- C.80. PropertyRegexTask
- C.80.1. Match expressions
- C.80.2. Replace
- C.80.3. Example
- C.81. ReplaceRegexpTask
- C.81.1. Supported Nested Tags
- 1. PropertySelector
- 1.1. Select expressions
- 1.2. Example
- C.82. rSTTask
- C.82.1. Features
- C.82.2. Examples
- C.82.3. Supported Nested Tags
- C.83. S3PutTask
- C.83.1. Example
- C.83.2. Supported Nested Tags
- C.84. S3GetTask
- C.84.1. Example
- C.85. SassTask
- C.85.1. Example
- C.85.2. Supported Nested Tags
- C.86. ScpTask
- C.86.1. Example
- C.86.2. Supported Nested Tags
- C.87. SmartyTask
- C.88. SonarTask
- C.88.1. Examples
- C.88.1.1. Minimal Example
- C.88.1.2. Full Example
- C.88.2. Supported Nested Tags
- C.89. SortList
- C.89.1. Example
- C.90. SshTask
- C.90.1. Example
- C.90.2. Supported Nested Tags
- C.91. SvnCheckoutTask
- C.91.1. Example
- C.92. SvnCommitTask
- C.92.1. Example
- C.93. SvnCopyTask
- C.93.1. Example
- C.94. SvnExportTask
- C.94.1. Example
- C.95. SvnInfoTask
- C.95.1. Example
- C.96. SvnLastRevisionTask
- C.96.1. Example
- C.97. SvnListTask
- C.97.1. Example
- C.98. SvnLogTask
- C.98.1. Example
- C.99. SvnUpdateTask
- C.99.1. Example
- C.100. SvnSwitchTask
- C.100.1. Example
- C.101. SvnProplistTask
- C.101.1. Example
- C.102. SvnPropgetTask
- C.102.1. Example
- C.103. SvnPropsetTask
- C.103.1. Example
- C.104. StopwatchTask
- C.104.1. Example
- C.105. SymfonyConsoleTask
- C.105.1. Examples
- C.105.2. Supported Nested Tags
- C.106. SymlinkTask
- C.106.1. Example
- C.106.2. Supported Nested Tags
- C.107. TarTask
- C.107.1. Example
- C.107.2. Supported Nested Tags
- C.108. ThrowTask
- C.108.1. Example
- C.109. UntarTask
- C.109.1. Example
- C.109.2. Supported Nested Tags
- C.110. UnzipTask
- C.110.1. Example
- C.110.2. Supported Nested Tags
- C.111. Variable
- C.111.1. Example
- C.112. VersionTask
- C.112.1. Example
- C.113. WikiPublishTask
- C.113.1. Example
- C.114. XmlLintTask
- C.114.1. Examples
- C.114.2. Supported Nested Tags
- C.115. XmlPropertyTask
- C.115.1. Example
- C.116. ZendCodeAnalyzerTask
- C.116.1. Example
- C.116.2. Supported Nested Tags
- C.117. ZendGuardEncodeTask
- C.117.1. Example
- C.117.2. Supported Nested Tags
- C.118. ZendGuardLicenseTask
- C.118.1. Examples
- C.119. ZipTask
- C.119.1. Example
- C.119.2. Supported Nested Tags
- C.120. ZSDTPackTask
- C.120.1. Example
- C.121. ZSDTValidateTask
- C.121.1. Example
- D. Core Types
- D.1. Description
- D.1.1. Usage Examples
- D.2. Excludes
- D.2.1. Nested tags
- D.2.2. Usage Examples
- D.3. FileList
- D.3.1. Usage Examples
- D.4. FileSet
- D.4.1. Using wildcards
- D.4.2. Usage Examples
- D.4.3. Nested tags
- D.4.4. Related types
- D.5. DirSet
- D.5.1. Using wildcards
- D.5.2. Usage Examples
- D.5.3. Nested tags
- D.5.4. Related types
- D.6. PatternSet
- D.6.1. Usage Example
- D.6.2. Nested tags
- D.7. Path / Classpath
- D.7.1. Nested tags
- D.8. PearPackageFileSet
- D.8.1. Usage Examples
- D.8.2. Nested tags
- E. Core filters
- E.1. PhingFilterReader
- E.1.1. Nested tags
- E.1.2. Advanced
- E.2. ExpandProperties
- E.3. ConcatFilter
- E.4. HeadFilter
- E.5. IconvFilter
- E.6. Line Contains
- E.6.1. Nested tags
- E.7. LineContainsRegexp
- E.7.1. Nested tags
- E.8. PrefixLines
- E.9. ReplaceTokens
- E.9.1. Nested tags
- E.10. ReplaceTokensWithFile
- E.10.1. Nested tags
- E.11. ReplaceRegexp
- E.11.1. Nested tags
- E.12. SortFilter
- E.13. StripLineBreaks
- E.14. StripLineComments
- E.14.1. Nested tags
- E.15. StripPhpComments
- E.16. StripWhitespace
- E.17. TabToSpaces
- E.18. TailFilter
- E.19. TidyFilter
- E.19.1. Nested tags
- E.20. XincludeFilter
- E.21. XsltFilter
- E.21.1. Nested tags
- F. Core mappers
- F.1. Common Attributes
- F.2. ChainedMapper
- F.2.1. Examples
- F.3. CompositeMapper
- F.3.1. Examples
- F.4. FirstMatchMapper
- F.4.1. Examples
- F.5. CutDirsMapper
- F.5.1. Examples
- F.6. FlattenMapper
- F.6.1. Examples
- F.7. GlobMapper
- F.7.1. Examples
- F.8. IdentityMapper
- F.9. MergeMapper
- F.9.1. Examples
- F.10. RegexpMapper
- F.10.1. Examples
- G. Core selectors
- G.1. Contains
- G.2. Date
- G.3. Depend
- G.4. Depth
- G.5. Different
- G.6. Filename
- G.7. Present
- G.8. Containsregexp
- G.9. Size
- G.10. Type
- G.11. And
- G.12. Majority
- G.13. None
- G.14. Not
- G.15. Or
- G.16. Readable
- G.17. Writable
- G.18. Executable
- G.19. Selector
- G.20. Symlink Selector
- H. Project Components
- H.1. Phing Projects
- H.1.1. Example
- H.1.2.
- H.1.3. Attributes
- H.2. Targets
- H.2.1. Example
- H.2.2. Attributes
- I. Loggers and Listeners
- I.1. Listeners
- I.2. Loggers
- I.3. DefaultLogger
- I.4. MailLogger
- I.5. NoBannerLogger
- I.6. ProfileLogger
- I.7. StatisticsListener
- I.8. TimestampedLogger
- J. File Formats
- J.1. Build File Format
- J.2. Property File Format
- Bibliography
- International Standards
- Licenses
- Open Source Projects
- Manuals
- Other Resources