DB_NestedSet::addListener()
-- Add an event listener
Description
Adds an event listener and returns an ID for it
Known events are
nodeCreate
nodeDelete
nodeUpdate
nodeCopy
nodeLoad
Parameter
- string
$event
The event name
- string
$listener
The listener object
Throws
throws
no exceptions thrown
Note
This function can not be called
statically.
Example
Example 36-1. Add Listener require_once('DB/NestedSet.php');
$nestedSet =& DB_NestedSet::factory('DB', $dsn, $params);
$nestedSet->AddListener("nodeCreate", "listener"); |
|