Classes, interfaces and traits

HttpRequestTask

A HTTP request task.

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

WikiPublishTask

Publish Wiki document using Wiki API.

Use {@link Project#createTask} to register a new Task.
« More »

S3PutTask

Stores an object on S3

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

S3GetTask

Downloads an object off S3

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

Service_Amazon_S3

Abstract Service_Amazon_S3 class.

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

Service_Amazon

Abstract Service_Amazon class.

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

PatchTask

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

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

PhpCodeSnifferTask_Wrapper

Wrapper to disable PHPCS's destructor

« More »

JslLintTask

A Javascript lint task. Checks syntax of Javascript files.

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

PackageAsPathTask

Convert dot-notation packages to relative paths.

Use {@link Project#createTask} to register a new Task.
« More »

ZendCodeAnalyzerTask

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

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

GrowlNotifyTask

Growl notification task for Phing, the PHP build tool.

PHP version 5
« More »

CapsuleTask

A phing task for generating output by using Capsule.

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

AssignedVar

An "inner" class for holding assigned var values.

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

FileSizeTask

fileHash

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

PhpCodeSnifferTask

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

Use {@link Project#createTask} to register a new Task.
« More »

PhpCodeSnifferTask_FormatterElement

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

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

PearPackage2Task

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

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

XmlLintTask

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

Use {@link Project#createTask} to register a new Task.
« More »

JsMinTask

Task to minify javascript files.

Requires JSMin which can be found at http://code.google.com/p/jsmin-php/ but is bundled with Phing so no additional install of JsMin is required.
« More »

Ssh2MethodParam

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

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

SshTask

Execute commands on a remote host using ssh.

Use {@link Project#createTask} to register a new Task.
« More »

Ssh2MethodConnectionParam

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

« More »

ScpTask

Copy files to and from a remote host using scp.

Use {@link Project#createTask} to register a new Task.
« More »

PhpLintTask

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

Use {@link Project#createTask} to register a new Task.
« More »

FileSyncTask

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

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

ComposerTask

Composer Task Run composer straight from phing

Use {@link Project#createTask} to register a new Task.
« More »

rSTTask

reStructuredText rendering task for Phing, the PHP build tool.

PHP version 5
« More »

TarTask

Creates a tar archive using PEAR Archive_Tar.

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

TarFileSet

This is a FileSet with the option to specify permissions.

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

SmartyTask

A phing task for generating output by using Smarty.

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

FtpDeployTask

FtpDeployTask

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

XmlPropertyTask

Task for setting properties from an XML file in buildfiles.

Use {@link Project#createTask} to register a new Task.
« More »

ManifestTask

ManifestTask

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

PearPackageTask

A task to create PEAR package.xml file.

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

PearPkgOption

Generic option class is used for non-complex options.

« More »

PearPkgMapping

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

« More »

PearPkgMappingElement

Sub-element of <mapping>.

« More »

PearPkgRole

Encapsulates file roles

« More »

ParallelTask

Uses the DocBlox_Parallel library to run nested Phing tasks concurrently.

WARNING: this task is highly experimental!
« More »

SymlinkTask

Generates symlinks based on a target / link combination.

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

MailTask

Send an e-mail message

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

ZipTask

Creates a zip archive using PHP ZipArchive extension/

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

ZipFileSet

This is a FileSet with the to specify permissions.

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

ExportPropertiesTask

Saves currently defined properties into a specified file

Use {@link Project#createTask} to register a new Task.
« More »

UnzipTask

Extracts one or several zip archives using ZipArchive class.

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

VersionTask

VersionTask

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

ExtractBaseTask

Base class for extracting tasks such as Unzip and Untar.

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

PharPackageTask

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

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

FileHashTask

fileHash

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

HttpGetTask

A HTTP request task.

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

UntarTask

Extracts one or several tar archives using PEAR Archive_Tar

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

LoadFileTask

LoadFileTask

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