phing
[ class tree: phing ] [ index: phing ] [ all elements ]

Class: Task

Source Location: /Task.php

Class Overview

ProjectComponent
   |
   --Task

The base class for all Tasks.


Author(s):

Version:

  • $Revision: 552 $

Copyright:

  • � 2001,2002 THYRELL. All rights reserved

Variables

Methods


Child classes:

CreoleTask
Handles Creole configuration needed by SQL type tasks.
PhpCpdTask
A PHP CPD task. Checking PHP files for Copy&Paste code.
PhpDocumentorTask
Task to run PhpDocumentor.
SshTask
Execute commands on a remote host using ssh.
JslLintTask
A Javascript lint task. Checks syntax of Javascript files.
PackageAsPathTask
Convert dot-notation packages to relative paths.
ZendCodeAnalyzerTask
ZendCodeAnalyzerTask analyze PHP source code using the ZendCodeAnalyzer included in Zend Studio 5.1
PhkPackageTask
See http://phk.tekwire.net/ for more information about PHK.
CapsuleTask
A phing task for generating output by using Capsule.
FileSizeTask
fileHash
CoverageReportTask
Transforms information in a code coverage database to XML
CoverageSetupTask
Initializes a code coverage database
CoverageMergerTask
Merges code coverage snippets into a code coverage database
PhpCodeSnifferTask
A PHP code sniffer task. Checking the style of one or more PHP source files.
XmlLintTask
A XML lint task. Checking syntax of one or more XML files against an XML Schema using the DOM extension.
JsMinTask
Task to minify javascript files.
ScpTask
Copy files to and from a remote host using scp.
PhpLintTask
A PHP lint task. Checking syntax of one or more PHP source file.
SimpleTestTask
Runs SimpleTest tests.
DbDeployTask
Generate SQL script for db using dbdeploy schema version table and delta scripts
PDOTask
Handles PDO configuration needed by SQL type tasks.
SmartyTask
A phing task for generating output by using Smarty.
FtpDeployTask
FtpDeployTask
ReplaceRegexpTask
ReplaceRegExp is a directory based task for replacing the occurrence of a given regular expression with a substitution pattern in a selected file or set of files.
ManifestTask
ManifestTask
MailTask
Send a message by mail()
IoncubeLicenseTask
Invokes the ionCube "make_license" program
IoncubeEncoderTask
Invokes the ionCube Encoder (PHP4 or PHP5)
SvnBaseTask
Base class for Subversion tasks
ScpSendTask
SCPs a File to a remote server
PHPUnitTask
Runs PHPUnit tests.
PHPUnitReportTask
Transform a PHPUnit xml report using XSLT.
VersionTask
VersionTask
FileHashTask
fileHash
TouchTask
Touch a file and/or fileset(s); corresponds to the Unix touch command.
AvailableTask
<available> task.
ExitTask
Exits the active build, giving an additional message if available.
CVSPassTask
Adds an new entry to a CVS password file.
IncludePathTask
Adds a normalized path to the PHP include_path.
MkdirTask
Task to create a directory.
TypedefTask
Register a datatype for use within a buildfile.
ExecTask
Executes a command on the shell.
CvsTask
Task for performing CVS operations.
SequentialTask
Sequential is a container task that contains other Phing Task objects.
AppendTask
Appends text, contents of a file or set of files defined by a filelist to a destination file.
ReflexiveTask
This task is for using filter chains to make changes to files and overwrite the original files.
MatchingTask
This is an abstract task that should be used by all those tasks that require to include or exclude files based on pattern matching.
TstampTask
Sets properties to the current time, or offsets from the current time.
PropertyTask
Task for setting properties in buildfiles.
ResolvePathTask
Task for resolving relative paths and setting absolute path in property value.
InputTask
Reads input from the InputHandler.
DeleteTask
Deletes a file or directory, or set of files defined by a fileset.
ChmodTask
Task that changes the permissions on a file/directory.
AdhocTask
Abstract class for creating adhoc Phing components in buildfile.
PhingTask
Task that invokes phing on another build file.
ForeachTask
<foreach> task
TaskdefTask
Register a task for use within a buildfile.
PropertyPromptTask
Deprecated task that uses console to prompt user for property values.
CopyTask
A phing copy task. Copies a file or directory to a new file or directory. Files are only copied if the source file is newer than the destination file, or when the destination file does not exist. It is possible to explictly overwrite existing files.
UpToDateTask
Sets the given property if the specified target has a timestamp greater than all of the source files.
PhpEvalTask
Executes PHP function or evaluates expression and sets return value to a property.
ImportTask
Imports another build file into the current project.
EchoTask
Echos a message to the logging system or to a file
PhingCallTask
Call another target in the same project.
ChownTask
Task that changes the permissions on a file/directory.
TaskAdapter
Use introspection to "adapt" an arbitrary ( not extending Task, but with similar patterns).
UnknownElement
Wrapper class that holds all information necessary to create a task that did not exist when Phing started.

Inherited Variables

Inherited Methods

Class: ProjectComponent

ProjectComponent::getProject()
Returns a reference to current project
ProjectComponent::log()
Logs a message with the given priority.
ProjectComponent::setProject()
References the project to the current component.

Class Details

[line 36]
The base class for all Tasks.

Use createTask to register a new Task.




Tags:

author:  Andreas Aderhold <andi@binarycloud.com>
version:  $Revision: 552 $
copyright:  � 2001,2002 THYRELL. All rights reserved
see:  createTask()
abstract:  


[ Top ]


Class Variables

$description =

[line 46]



Tags:

var:  description of the task
access:  protected

Type:   string


[ Top ]

$location =

[line 61]



Tags:

var:  stored buildfile location
access:  protected

Type:   Location


[ Top ]

$target =

[line 41]



Tags:

var:  owning Target object
access:  protected

Type:   Target


[ Top ]

$taskName =

[line 56]



Tags:

var:  Taskname for logger
access:  protected

Type:   string


[ Top ]

$taskType =

[line 51]



Tags:

var:  internal taskname (req)
access:  protected

Type:   string


[ Top ]

$wrapper =

[line 66]



Tags:

var:  wrapper of the task
access:  protected



[ Top ]



Class Methods


method getDescription [line 165]

string getDescription( )

Returns the textual description of the task



Tags:

return:  The text description of the task
access:  public


[ Top ]

method getLocation [line 199]

Location getLocation( )

Returns the location within the buildfile this task occurs. Used by BuildException to give detailed error messages.



Tags:

return:  The location object describing the position of this task within the buildfile.


[ Top ]

method getOwningTarget [line 82]

Target getOwningTarget( )

Returns the owning target of this task.



Tags:

return:  The target object that owns this task
access:  public


[ Top ]

method getRegisterSlot [line 135]

void getRegisterSlot( $slotName)

Returns a name



Tags:

access:  protected


Parameters:

   $slotName  

[ Top ]

method getRuntimeConfigurableWrapper [line 219]

RuntimeConfigurable getRuntimeConfigurableWrapper( )

Returns the wrapper object for runtime configuration



Tags:

return:  The wrapper object used by this task


[ Top ]

method getTaskName [line 91]

string getTaskName( )

Returns the name of task, used only for log messages



Tags:

return:  Name of this task
access:  public


Overridden in child classes as:

UnknownElement::getTaskName()
Get the name of the task to use in logging messages.

[ Top ]

method getTaskType [line 118]

string getTaskType( )

Returns the name of the task under which it was invoked, usually the XML tagname



Tags:

return:  The type of this task (XML Tag)
access:  public


[ Top ]

method init [line 177]

void init( )

Called by the parser to let the task initialize properly.

Should throw a BuildException if something goes wrong with the build

This is abstract here, but may not be overloaded by subclasses.




Tags:

throws:  BuildException
access:  public


Overridden in child classes as:

CreoleTask::init()
Initialize CreoleTask.
PhpDocumentorTask::init()
Load the necessary environment for running PhpDoc.
PhpDocumentorExternalTask::init()
Override PhpDocumentorTask::init() because they're specific to the phpdoc API which we don't use.
SshTask::init()
PhkPackageTask::init()
CoverageSetupTask::init()
JsMinTask::init()
The init method: Do init steps.
ScpTask::init()
SimpleTestTask::init()
Initialize Task.
PDOTask::init()
Initialize CreoleTask.
SmartyTask::init()
FtpDeployTask::init()
The init method: check if Net_FTP is available
ReplaceRegexpTask::init()
ManifestTask::init()
The init method: Do init steps.
SvnBaseTask::init()
Initialize Task.
ScpSendTask::init()
The init method: Do init steps.
PHPUnitTask::init()
Initialize Task.
CvsTask::init()
TarTask::init()
Ensures that PEAR lib exists.
PearPackageTask::init()
PearPackage2Task::init()
UntarTask::init()
Ensures that PEAR lib exists.
PhingTask::init()
Creates a Project instance for the project to call.
ForeachTask::init()
PropertyPromptTask::init()
Initializes this task.
XsltTask::init()
Setup the filterchains w/ XSLTFilter that we will use while copying the files.
ImportTask::init()
Initialize task.
PhingCallTask::init()
init this task by creating new instance of the phing task and configuring it's by calling its own init method.

[ Top ]

method log [line 147]

void log( string $msg, [integer $level = Project::MSG_INFO])

Provides a project level log event to the task.



Tags:

see:  BuildListener
see:  BuildEvent


Overrides ProjectComponent::log() (Logs a message with the given priority.)

Parameters:

string   $msg   The message to log
integer   $level   The priority of the message

[ Top ]

method main [line 190]

void main( )

Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running <em>phing target1 target2</em> will run all tasks in target3 twice.

Should throw a BuildException if someting goes wrong with the build

This is abstract here. Must be overloaded by real tasks.




Tags:

abstract:  
access:  public


Overridden in child classes as:

CreoleSQLExecTask::main()
Load the sql file and then execute it
PhpCpdTask::main()
Executes PHP code sniffer against PhingFile or a FileSet
PhpDocumentorTask::main()
Main entrypoint of the task
PhpDocumentorExternalTask::main()
Main entrypoint of the task
SshTask::main()
JslLintTask::main()
Execute lint check against PhingFile or a FileSet
PackageAsPathTask::main()
Executes the package to patch converstion and stores it in the user property
  1. value
.
ZendCodeAnalyzerTask::main()
Analyze against PhingFile or a FileSet
PhkPackageTask::main()
Main method...
CapsuleTask::main()
Execute the input script with Velocity
FileSizeTask::main()
Main-Method for the Task
CoverageReportTask::main()
CoverageSetupTask::main()
CoverageMergerTask::main()
PhpCodeSnifferTask::main()
Executes PHP code sniffer against PhingFile or a FileSet
XmlLintTask::main()
Execute lint check against PhingFile or a FileSet
JsMinTask::main()
The main entry point method.
ScpTask::main()
PhpLintTask::main()
Execute lint check against PhingFile or a FileSet
SimpleTestTask::main()
The main entry point
DbDeployTask::main()
PDOSQLExecTask::main()
Load the sql file and then execute it
SmartyTask::main()
Execute the input script with Velocity
FtpDeployTask::main()
The main entry point method.
ReplaceRegexpTask::main()
ManifestTask::main()
Delegate the work
MailTask::main()
IoncubeLicenseTask::main()
The main entry point
IoncubeEncoderTask::main()
The main entry point
SvnCopyTask::main()
The main entry point
SvnCheckoutTask::main()
The main entry point
SvnCommitTask::main()
The main entry point
SvnExportTask::main()
The main entry point
SvnUpdateTask::main()
The main entry point
SvnLastRevisionTask::main()
The main entry point
ScpSendTask::main()
The main entry point method.
PHPUnitTask::main()
The main entry point
PHPUnitReportTask::main()
The main entry point
VersionTask::main()
Main-Method for the Task
FileHashTask::main()
Main-Method for the Task
TouchTask::main()
Execute the touch operation.
AvailableTask::main()
ExitTask::main()
CVSPassTask::main()
Does the work.
IncludePathTask::main()
Main entry point
MkdirTask::main()
create the directory and all parents
TypedefTask::main()
Main entry point
ExecTask::main()
Main method: wraps execute() command.
CvsTask::main()
SequentialTask::main()
Execute all nestedTasks.
AppendTask::main()
Append the file(s).
ReflexiveTask::main()
Append the file(s).
TarTask::main()
do the work
PearPackageTask::main()
Main entry point.
PearPackage2Task::main()
Main entry point.
ZipTask::main()
do the work
ExtractBaseTask::main()
do the work
PharPackageTask::main()
TstampTask::main()
Create the timestamps. Custom ones are done before the standard ones.
PropertyTask::main()
set the property in the project to the value.
ResolvePathTask::main()
Perform the resolution & set property.
InputTask::main()
Actual method executed by phing.
DeleteTask::main()
Delete the file(s).
ChmodTask::main()
Execute the touch operation.
AdhocTask::main()
Main entry point
AdhocTaskdefTask::main()
Main entry point
AdhocTypedefTask::main()
Main entry point
PhingTask::main()
Main entry point for the task.
ForeachTask::main()
This method does the work.
TaskdefTask::main()
Main entry point
PropertyPromptTask::main()
Run the PropertyPrompt task.
CopyTask::main()
The main entry point where everything gets in motion.
XsltTask::main()
Set any XSLT Param and invoke CopyTask::main()
UpToDateTask::main()
Sets property to true if target file(s) have a more recent timestamp than (each of) the corresponding source file(s).
PhpEvalTask::main()
Main entry point.
ImportTask::main()
Parse a Phing build file and copy the properties, tasks, data types and targets it defines into the current project.
EchoTask::main()
WarnTask::main()
PhingCallTask::main()
hand off the work to the phing task of ours, after setting it up
ChownTask::main()
Execute the touch operation.
TaskAdapter::main()
Main entry point.
UnknownElement::main()
Called when the real task has been configured for the first time.

[ Top ]

method maybeConfigure [line 239]

void maybeConfigure( )

Configure this task if it hasn't been done already.



Tags:

access:  public


Overridden in child classes as:

UnknownElement::maybeConfigure()
Tries to configure the unknown element

[ Top ]

method perform [line 248]

void perform( )

Perfrom this task



Tags:

access:  public


[ Top ]

method setDescription [line 156]

void setDescription( string $desc)

Sets a textual description of the task



Tags:

access:  public


Parameters:

string   $desc   The text describing the task

[ Top ]

method setLocation [line 210]

void setLocation( $location)

Sets the location within the buildfile this task occurs. Called by the parser to set location information.



Parameters:

Location   $location   The location object describing the position of this task within the buildfile.

[ Top ]

method setOwningTarget [line 73]

void setOwningTarget( Target $target)

Sets the owning target this task belongs to.



Tags:

access:  public


Parameters:

Target   $target   Reference to owning target

[ Top ]

method setRuntimeConfigurableWrapper [line 232]

void setRuntimeConfigurableWrapper( RuntimeConfigurable $wrapper)

Sets the wrapper object this task should use for runtime configurable elements.



Parameters:

RuntimeConfigurable   $wrapper   The wrapper object this task should use

[ Top ]

method setTaskName [line 108]

string setTaskName( $name)

Sets the name of this task for log messages



Tags:

return:  A string representing the name of this task for log
access:  public


Parameters:

   $name  

[ Top ]

method setTaskType [line 127]

void setTaskType( string $name)

Sets the type of the task. Usually this is the name of the XML tag



Tags:

access:  public


Parameters:

string   $name   The type of this task (XML Tag)

[ Top ]


Documentation generated on Mon, 19 Oct 2009 10:52:12 +0200 by phpDocumentor 1.4.3