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

Class: ReflexiveTask

Source Location: /tasks/system/ReflexiveTask.php

Class Overview

ProjectComponent
   |
   --Task
      |
      --ReflexiveTask

This task is for using filter chains to make changes to files and overwrite the original files.


Author(s):

Version:

  • $Revision: 552 $

Copyright:

  • � 2001,2002 THYRELL. All rights reserved

Methods


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 49]
This task is for using filter chains to make changes to files and overwrite the original files.

This task was created to serve the need for "cleanup" tasks -- e.g. a ReplaceRegexp task or strip task being used to modify files and then overwrite the modified files. In many (most?) cases you probably should just use a copy task to preserve the original source files, but this task supports situations where there is no src vs. build directory, and modifying source files is actually desired.

  1.     <reflexive>
  2.         <fileset dir=".">
  3.             <include pattern="*.html">
  4.         </fileset>
  5.         <filterchain>
  6.             <replaceregexp>
  7.                 <regexp pattern="\n\r" replace="\n"/>
  8.             </replaceregexp>
  9.         </filterchain>
  10.     </reflexive>




Tags:

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


[ Top ]


Class Methods


method createFileSet [line 66]

void createFileSet( )

Nested creator, adds a set of files (nested fileset attribute).



[ Top ]

method createFilterChain [line 76]

object The createFilterChain( )

Creates a filterchain



Tags:

return:  created filterchain object


[ Top ]

method main [line 82]

void main( )

Append the file(s).



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 ]

method setFile [line 61]

void setFile( $f)

Alias for setFrom()



Parameters:

PhingFile   $f  

[ Top ]


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