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

Class: UnknownElement

Source Location: /UnknownElement.php

Class Overview

ProjectComponent
   |
   --Task
      |
      --UnknownElement

Wrapper class that holds all information necessary to create a task that did not exist when Phing started.


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 37]
Wrapper class that holds all information necessary to create a task that did not exist when Phing started.

<em> This has something to do with phing encountering an task XML element it is not aware of at start time. This is a situation where special steps need to be taken so that the element is then known.</em>




Tags:

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


[ Top ]


Class Methods


constructor __construct [line 49]

UnknownElement __construct( string $elementName)

Constructs a UnknownElement object



Tags:

access:  public


Parameters:

string   $elementName   The XML element name that is unknown

[ Top ]

method addChild [line 105]

void addChild( UnknownElement $child)

Add a child element to the unknown element



Tags:

access:  public


Parameters:

object The   $child   object representing the child element

[ Top ]

method getTag [line 59]

string getTag( )

Return the XML element name that this
  1. UnnownElement
handles.



Tags:

return:  The XML element name that is unknown
access:  public


[ Top ]

method getTaskName [line 212]

string getTaskName( )

Get the name of the task to use in logging messages.



Tags:

return:  The task's name


Overrides Task::getTaskName() (Returns the name of task, used only for log messages)

[ Top ]

method handleChildren [line 115]

void handleChildren( ProjectComponent $parent, object The $parentWrapper)

Handle child elemets of the unknown element, if any.



Parameters:

ProjectComponent   $parent   The parent object the unkown element belongs to
object The   $parentWrapper   parent wrapper object

[ Top ]

method main [line 86]

void main( )

Called when the real task has been configured for the first time.



Tags:

throws:  BuildException if the task can not be created
access:  public


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 makeObject [line 161]

object The makeObject( UnknownElement $ue, RuntimeConfigurable $w)

Creates a named task or data type. If the real object is a task, it is configured up to the init() stage.



Tags:

return:  Task or DataType represented by the given unknown element.
access:  protected


Parameters:

UnknownElement   $ue   The unknown element to create the real object for. Must not be
  1. null
.
RuntimeConfigurable   $w   Ignored in this implementation.

[ Top ]

method makeTask [line 180]

Task makeTask( UnknownElement $ue, RuntimeConfigurable $w, [boolean $onTopLevel = false])

Create a named task and configure it up to the init() stage.



Tags:

return:  The freshly created task
access:  protected


Parameters:

UnknownElement   $ue   The unknwon element to create a task from
RuntimeConfigurable   $w   The wrapper object
boolean   $onTopLevel   Whether to treat this task as if it is top-level.

[ Top ]

method maybeConfigure [line 68]

void maybeConfigure( )

Tries to configure the unknown element



Tags:

throws:  BuildException if the element can not be configured
access:  public


Overrides Task::maybeConfigure() (Configure this task if it hasn't been done already.)

[ Top ]


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