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