Task.php

Show: inherited
Table of Contents

The base class for all Tasks.

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

Author
Andreas Aderhold  
Copyright
2001,2002 THYRELL. All rights reserved  
Package
phing  
See
\Project#createTask()  
Version
$Id$  

\Task

Package: phing

The base class for all Tasks.

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

Parent(s)
\ProjectComponent
Children
\ApiGenTask
\CreoleTask
\GitBaseTask
\PhpDocumentor2Task
\PhpDocumentorTask
\HttpRequestTask
\Service_Amazon
\SshTask
\PatchTask
\JslLintTask
\PackageAsPathTask
\ZendCodeAnalyzerTask
\PhkPackageTask
\PHPMDTask
\PhpDependTask
\CapsuleTask
\FileSizeTask
\CoverageReportTask
\CoverageSetupTask
\CoverageThresholdTask
\CoverageMergerTask
\ZendGuardLicenseTask
\PhpCodeSnifferTask
\XmlLintTask
\JsMinTask
\PHPCPDTask
\ScpTask
\PhpLintTask
\SimpleTestTask
\DbDeployTask
\PDOTask
\DocBloxTask
\SymfonyConsoleTask
\AbstractLiquibaseTask
\rSTTask
\SmartyTask
\FtpDeployTask
\ReplaceRegexpTask
\ManifestTask
\SymlinkTask
\MailTask
\IoncubeLicenseTask
\IoncubeEncoderTask
\ExportPropertiesTask
\SvnBaseTask
\PHPUnitTask
\PHPUnitReportTask
\VersionTask
\FileHashTask
\HttpGetTask
\TryCatchTask
\TouchTask
\AvailableTask
\CVSPassTask
\IncludePathTask
\LoadFileTask
\MkdirTask
\TypedefTask
\ExecTask
\CvsTask
\SequentialTask
\AppendTask
\ReflexiveTask
\MatchingTask
\FailTask
\TstampTask
\PropertyTask
\ResolvePathTask
\InputTask
\DeleteTask
\ChmodTask
\AdhocTask
\PhingTask
\ForeachTask
\TaskdefTask
\PropertyPromptTask
\CopyTask
\UpToDateTask
\PhpEvalTask
\ImportTask
\EchoTask
\PhingCallTask
\ChownTask
\TaskAdapter
\UnknownElement
See
\Project#createTask()  
Author
Andreas Aderhold  
Copyright
2001,2002 THYRELL. All rights reserved  
Version
$Id$  

Properties

Propertyprotectedstring  $description= ''

Description of the task

Details
Type
string
Propertyprotected\Location  $location= ''

Stored buildfile location

Details
Type
\Location
Propertyprotected\Project  $project= 'null'
inherited

Holds a reference to the project that a project component (a task, a target, etc.) belongs to

A reference to the current project instanceInherited from: \ProjectComponent::$$project
Default valuenullDetails
Type
\Project
Inherited_from
\ProjectComponent::$$project  
Propertyprotected\Target  $target= ''

Owning Target object

Details
Type
\Target
Propertyprotectedstring  $taskName= ''

Taskname for logger

Details
Type
string
Propertyprotectedstring  $taskType= ''

Internal taskname (req)

Details
Type
string
Propertyprotected\RuntimeConfigurable  $wrapper= ''

Wrapper of the task

Details
Type
\RuntimeConfigurable

Methods

methodpublicgetDescription( ) : string

Returns the textual description of the task

Returns
Type Description
string The text description of the task
methodpublicgetLocation( ) : \Location

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

Returns
Type Description
\Location The location object describing the position of this task within the buildfile.
methodpublicgetOwningTarget( ) : \Target

Returns the owning target of this task.

Returns
Type Description
\Target The target object that owns this task
methodpublicgetProject( ) : \Project
inherited

Returns a reference to current project

Inherited from: \ProjectComponent::getProject()
Returns
Type Description
\Project Reference to current porject object
methodprotectedgetRegisterSlot( string $slotName ) : void

Returns a name

Parameters
Name Type Description
$slotName string
methodpublicgetRuntimeConfigurableWrapper( ) : \RuntimeConfigurable

Returns the wrapper object for runtime configuration

Returns
Type Description
\RuntimeConfigurable The wrapper object used by this task
methodpublicgetTaskName( ) : string

Returns the name of task, used only for log messages

Returns
Type Description
string Name of this task
methodpublicgetTaskType( ) : string

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

Returns
Type Description
string The type of this task (XML Tag)
methodpublicinit( ) : void

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.

Throws
Exception Description
\BuildException
methodpubliclog( string $msg, integer $level = Project::MSG_INFO ) : void

Provides a project level log event to the task.

Parameters
Name Type Description
$msg string

The message to log

$level integer

The priority of the message

Details
See
\BuildEvent  
See
\BuildListener  
methodpublicmain( ) : void
abstract

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 phing target1 target2 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.

methodpublicmaybeConfigure( ) : void

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

methodpublicperform( ) : void

Perfrom this task

methodpublicsetDescription( string $desc ) : void

Sets a textual description of the task

Parameters
Name Type Description
$desc string

The text describing the task

methodpublicsetLocation( \Location $location ) : void

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

Parameters
Name Type Description
$location \Location

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

methodpublicsetOwningTarget( \Target $target ) : void

Sets the owning target this task belongs to.

Parameters
Name Type Description
$target \Target

Reference to owning target

methodpublicsetProject( \Project $project ) : void
inherited

References the project to the current component.

Inherited from: \ProjectComponent::setProject()
Parameters
Name Type Description
$project \Project

The reference to the current project

methodpublicsetRuntimeConfigurableWrapper( \RuntimeConfigurable $wrapper ) : void

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

Parameters
Name Type Description
$wrapper \RuntimeConfigurable

The wrapper object this task should use

methodpublicsetTaskName( string $name ) : string

Sets the name of this task for log messages

Parameters
Name Type Description
$name string
Returns
Type Description
string A string representing the name of this task for log
methodpublicsetTaskType( string $name ) : void

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

Parameters
Name Type Description
$name string

The type of this task (XML Tag)

Documentation was generated by DocBlox 0.18.1.