tasks/ext/PearPackageTask.php
\PearPackageTask
A task to create PEAR package.xml file.
This class uses the PEAR_PackageFileMaintainer class to perform the work.
This class is designed to be very flexible -- i.e. account for changes to the package.xml w/o requiring changes to this class. We've accomplished this by having generic
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.
- Parent(s)
- \MatchingTask < \Task < \ProjectComponent
- Children
- \PearPackage2Task
- Author
- Hans Lellelid
- Version
- $Id: PearPackageTask.php 1162 2011-06-17 21:24:01Z mrook $
Properties

\PearPkgRole[]
$roles= 'array()'
Nested <role> elements
array()Details- Type
- \PearPkgRole[]
Methods

createFileSet(
)
:
\FileSetNested creator, creates a FileSet for this task
| Type | Description |
|---|---|
| \FileSet | The created fileset object |

fixDeps(
$deps
)
:
voidFixes the boolean in optional dependencies
| Name | Type | Description |
|---|---|---|
| $deps |

getFileSets(
)
:
arrayUsed by the PEAR_PackageFileManager_PhingFileSet lister.
| Type | Description |
|---|---|
| array | FileSet[] |

populateOptions(
)
:
voidAdds the options that are set via attributes and the nested tags to the options array.

setDestFile(
$f
)
:
voidSets the file to use for generated package.xml
| Name | Type | Description |
|---|---|---|
| $f |

setDir(
\PhingFile $f
)
:
voidSets "dir" property from XML.
| Name | Type | Description |
|---|---|---|
| $f | \PhingFile |

setName(
string $v
)
:
voidSets "name" property from XML.
| Name | Type | Description |
|---|---|---|
| $v | string |

setPackage(
string $v
)
:
voidSet "package" property from XML.
| Name | Type | Description |
|---|---|---|
| $v | string |
- See
- \setName()
\PearPkgMapping
Handles complex options <mapping> elements which are hashes (assoc arrays).
Properties
Methods
\PearPkgMappingElement
Sub-element of <mapping>.
Properties
Methods
\PearPkgOption
Generic option class is used for non-complex options.