Class ZFormElementEvent

Description

Located in /Form/ZFormElementEvent.php (line 32)


	
			
Class Constant Summary
 ONBLUR = 'Blur'
 ONCLICK = 'Click'
 ONVALUECHANGE = 'Change'
Variable Summary
Method Summary
 ZFormElementEvent __construct (string $type, ZFormElement $source, mixed $data)
 boolean fire ()
 mixed getData ()
 string getType ()
Variables
mixed $_data (line 63)

The $_data variable contains a mixed variable the is opaque to the event structure. This can be used to communicate specialized data such as old & new value in the ONVALUECHANGE event.

  • access: protected
ZFormElement $_source (line 54)

The $_source variable contains the ZFormElement that trigged the event.

  • access: protected
string $_type (line 47)

Contains the type of the event see constants above

  • access: protected
Methods
Constructor __construct (line 74)

Class constructor. Simply initialize the instance variables to the variables passed

  • access: public
ZFormElementEvent __construct (string $type, ZFormElement $source, mixed $data)
fire (line 133)

Delivers the event to the registered event listeners for the type specified by the event from the subject.

If a listeners is an object fire attempts to invoke the methods defined by concatenating 'on' with the id of the source object and the type of the method. For example if: the source id = test the type of ONVALUECHANGE the method name would be -> onTestChange If that method does not exist and the listener is an instanceof ZFormElementEventListenerInterface the general handleEvent is invoked. Finally if the object listener is a string and a callable the function is invoked with the event as an argument

  • return: true no listeners found or the the result of invoking the listeners method/function.
  • access: public
boolean fire ()
getData (line 109)

Returns the opaque user data associated with the event

  • access: public
mixed getData ()
getSource (line 98)

Returns the ZFormElement which is the source of the event

  • access: public
ZFormElement getSource ()
getType (line 87)

Returns the type of the event. See constants in ZFormElementEvent

  • access: public
string getType ()
Class Constants
ONBLUR = 'Blur' (line 41)
ONCLICK = 'Click' (line 39)

Event constants supported by the framework

ONVALUECHANGE = 'Change' (line 40)

Documentation generated on Wed, 21 Feb 2007 12:03:28 -0800 by phpDocumentor 1.3.1