Holds the event details that are passed to application listeners to act on. Events have an event code and message at the most basic level, however the source object and an array of options can be supplied to give further information to the listener.

Event codes are defined as bit constants from OK 0 to WARNING 65536. Other codes may be added in time.

Various OPTION_ constants are available for some frequently used parameters. These can be passed into the event options and will be picked up by various components including the default listeners. For example:

$oEvent = new cliApplicationEvent(
    $inEventCode, $inEventMessage, null, array(
        cliApplicationEvent::OPTION_TRIGGER_LEVEL => 30,
        cliApplicationEvent::OPTION_LOOP_PROCESS_ID => 'loop5400',


public __construct($inEventCode, $inEventMessage, [$inSource = null], [$inOptions = array()])

Creates a new application event object

Event will have status $inEventCode, message $inEventMessage, the original source object (optional) and an array of additional data via $inOptions.

public reset()

Resets the object

public isModified()

Returns true if object has been modified

public setModified([$status = true])

Set the status of the object if it has been changed

public getEventCode()

Returns $_EventCode

public getEventCodeAsString()

Returns the event code as a string

public setEventCode($inEventCode)

Set $_EventCode to $inEventCode

public getEventMessage()

Returns $_EventMessage

public setEventMessage($inEventMessage)

Set $_EventMessage to $inEventMessage

public getEventSource()

Returns $_EventSource, which is an object

public setEventSource($inEventSource)

Set $_EventSource to $inEventSource

public getOptions()

Returns $_Options

public getOption($inParamName)

Returns the option named $inParamName

public setOptions($inOptions)

Set $_Options to $inOptions

<  1  >