SEvent Class Reference
[Event Handling]

Represents a user-generated event to be handled. More...

Inheritance diagram for SEvent:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 doc ()
 Return a documentation string about this class.
 getAttributes ()
 Get the names of all attributes for this object/entity.
 getUniqueAttributes ()
 Get the list of unique attributes for this object (candidate keys).

Protected Attributes

 $action
 The numeric code of the action performed (from a class constant).
 $details
 An associated array of details about this event.
 $source
 The source of the action, usually represented as a user ID.
 $target
 The target of the action, usually represented as an object ID.
 $transaction
 The transaction ID, which cannot be used twice (makes events idempotent).


Detailed Description

Represents a user-generated event to be handled.

An instance of this class represents an event generated by the user of the application, most often through a POST request. The object extends SModel in case we want to store it in our project's database!

Author:
Jonathan Stuart-Moore <jwsm@shodor.org> (6/17/07)
Date:
5/4/07

updated 6/17/07


Member Function Documentation

SEvent::getAttributes (  ) 

Get the names of all attributes for this object/entity.

Return an array of all the instance variables for this object/entity that should be committed to the database when commit() is called on this object.

Returns:
[array]: The list of attribute names (as strings)

Reimplemented from SModel.

SEvent::getUniqueAttributes (  ) 

Get the list of unique attributes for this object (candidate keys).

Return a list of the unique attributes (candidate keys) for this object. The first item in this list must be the primary key. But you should theoretically be able to populate on any attribute in this list.

For most objects, this function will return a list with one element -- the string 'id'

Returns:
[array]: The list of unique attribute names (as strings)

Reimplemented from SModel.


The documentation for this class was generated from the following file:

Generated on Wed Nov 24 02:02:59 2010 for Common by  doxygen 1.5.6