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

Class: AppendTask

Source Location: /tasks/system/AppendTask.php

Class Overview

ProjectComponent
   |
   --Task
      |
      --AppendTask

Appends text, contents of a file or set of files defined by a filelist to a destination file.


Author(s):

Version:

  • $Revision: 526 $

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 53]
Appends text, contents of a file or set of files defined by a filelist to a destination file.

  1.  <append text="And another thing\n" destfile="badthings.log"/>
OR
  1.  <append file="header.html" destfile="fullpage.html"/>
  2.  <append file="body.html" destfile="fullpage.html"/>
  3.  <append file="footer.html" destfile="fullpage.html"/>
OR
  1.  <append destfile="${process.outputfile}">
  2.     <filterchain>
  3.         <xsltfilter style="${process.stylesheet}">
  4.             <param name="mode" expression="${process.xslt.mode}"/>
  5.             <param name="file_name" expression="%{task.append.current_file.basename}"/> <!-- Example of using a RegisterSlot variable -->
  6.         </xsltfilter>
  7.     </filterchain>
  8.      <filelist dir="book/" listfile="book/PhingGuide.book"/>
  9.  </append>




Tags:

author:  Andreas Aderhold <andi@binarycloud.com>
version:  $Revision: 526 $
copyright:  � 2001,2002 THYRELL. All rights reserved


[ Top ]


Class Methods


method addText [line 136]

void addText( string $txt)

Sets text to append. Supports CDATA.



Parameters:

string   $txt  

[ Top ]

method createFileList [line 99]

FileList createFileList( )

Supports embedded <filelist> element.



[ Top ]

method createFileSet [line 109]

FileSet createFileSet( )

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

This is for when you don't care what order files get appended.




[ Top ]

method createFilterChain [line 119]

FilterChain createFilterChain( )

Creates a filterchain



Tags:

return:  The created filterchain object


[ Top ]

method main [line 142]

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 setDestFile [line 91]

void setDestFile( $f)

The more conventional naming for method to set destination file.



Parameters:

PhingFile   $f  

[ Top ]

method setFile [line 74]

void setFile( $f)

Sets specific file to append.



Parameters:

PhingFile   $f  

[ Top ]

method setText [line 128]

void setText( string $txt)

Sets text to append. (cannot be used in conjunction w/ files or filesets).



Parameters:

string   $txt  

[ Top ]

method setTo [line 82]

void setTo( $f)

Set target file to append to.



Tags:

deprecated:  Will be removed with final release.


Parameters:

PhingFile   $f  

[ Top ]


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