phing-tasks-system
[ class tree: phing-tasks-system ] [ index: phing-tasks-system ] [ all elements ]

Class: AdhocTask

Source Location: /tasks/system/AdhocTask.php

Class Overview

ProjectComponent
   |
   --Task
      |
      --AdhocTask

Abstract class for creating adhoc Phing components in buildfile.


Author(s):

Version:

  • $Revision: 526 $

Copyright:

  • � 2001,2002 THYRELL. All rights reserved

Variables

Methods


Child classes:

AdhocTaskdefTask
A class for creating adhoc tasks in build file.
AdhocTypedefTask
A class for creating adhoc datatypes in build file.

Inherited Variables

Inherited Methods

Class: Task

Task::getDescription()
Returns the textual description of the task
Task::getLocation()
Returns the location within the buildfile this task occurs. Used by BuildException to give detailed error messages.
Task::getOwningTarget()
Returns the owning target of this task.
Task::getRegisterSlot()
Returns a name
Task::getRuntimeConfigurableWrapper()
Returns the wrapper object for runtime configuration
Task::getTaskName()
Returns the name of task, used only for log messages
Task::getTaskType()
Returns the name of the task under which it was invoked, usually the XML tagname
Task::init()
Called by the parser to let the task initialize properly.
Task::log()
Provides a project level log event to the task.
Task::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.
Task::maybeConfigure()
Configure this task if it hasn't been done already.
Task::perform()
Perfrom this task
Task::setDescription()
Sets a textual description of the task
Task::setLocation()
Sets the location within the buildfile this task occurs. Called by the parser to set location information.
Task::setOwningTarget()
Sets the owning target this task belongs to.
Task::setRuntimeConfigurableWrapper()
Sets the wrapper object this task should use for runtime configurable elements.
Task::setTaskName()
Sets the name of this task for log messages
Task::setTaskType()
Sets the type of the task. Usually this is the name of the XML tag

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 37]
Abstract class for creating adhoc Phing components in buildfile.

By itself this class can be used to declare a single class within your buildfile. You can then reference this class in any task that takes custom classes (selectors, mappers, filters, etc.)

Subclasses exist for conveniently declaring and registering tasks and types.




Tags:

author:  Hans Lellelid <hans@xmpl.org>
version:  $Revision: 526 $
copyright:  � 2001,2002 THYRELL. All rights reserved


[ Top ]


Class Variables

$newClasses = array()

[line 45]



Tags:

access:  protected

Type:   mixed


[ Top ]

$script =

[line 43]

The PHP script



Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


method addText [line 84]

void addText( string $script)

Set the script.



Tags:

access:  public


Parameters:

string   $script  

[ Top ]

method execute [line 74]

string execute( )

Load the adhoc class, and perform any core validation.



Tags:

return:  The classname of the ProjectComponent class.
throws:  BuildException - if more than one class is defined.
access:  protected


[ Top ]

method getNewClasses [line 65]

array getNewClasses( )

Get array of names of newly defined classes.



Tags:

access:  protected


[ Top ]

method main [line 50]

void main( )

Main entry point



Tags:

access:  public


Overridden in child classes as:

AdhocTaskdefTask::main()
Main entry point
AdhocTypedefTask::main()
Main entry point

Overrides Task::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.)

[ Top ]


Documentation generated on Mon, 19 Oct 2009 10:50:16 +0200 by phpDocumentor 1.4.3