Encapsulates a build specific event.

<

p>We have three sources of events all handled by this class:

  • Project level events
  • Target level events
  • Task level events

<

p> Events are all fired from the project class by creating an event object using this class and passing it to the listeners.

author Andreas Aderhold
author Hans Lellelid
version $Id$
package phing

 Methods

Construct a BuildEvent for a project, task or target source event

__construct(object $source) 

Parameters

$source

object

project the project that emitted the event.

Returns the exception that was thrown, if any.

getException() : \Exception

This field will only be set for "taskFinished", "targetFinished", and "buildFinished" events.

see \global\BuildListener::taskFinished()
see \global\BuildListener::targetFinished()
see \global\BuildListener::buildFinished()

Returns

Returns the logging message.

getMessage() : string

This field will only be set for "messageLogged" events.

Returns

stringThe log message

Returns the priority of the logging message.

getPriority() : integer

This field will only be set for "messageLogged" events.

Returns

integerThe message priority

Returns the project instance that fired this event.

getProject() : \Project

The reference to the project instance is set by the constructor if this event was fired from the project class.

Returns

\ProjectThe project instance that fired this event

The object on which the Event initially occurred.

getSource() 
Inherited
inherited_from \EventObject::getSource()

Returns the target instance that fired this event.

getTarget() : \Target

The reference to the target instance is set by the constructor if this event was fired from the target class.

Returns

\TargetThe target that fired this event

Returns the target instance that fired this event.

getTask() : \Task

The reference to the task instance is set by the constructor if this event was fired within a task.

Returns

\TaskThe task that fired this event

Set the exception that was the cause of this event.

setException(\Exception $exception) 

Parameters

$exception

\Exception

The exception that caused the event

Sets the message with details and the message priority for this event.

setMessage(string $message, integer $priority) 

Parameters

$message

string

The string message of the event

$priority

integer

The priority this message should have

Returns a String representation of this EventObject.

toString() 
Inherited
inherited_from \EventObject::toString()

 Properties

 

$exception : object
 

$message : string
 

$priority : string
 

$project : \Project
 

$source 
Inherited
inherited_from \EventObject::$$source
 

$target : \Target
 

$task : \Task