DB_NestedSet::addListener

DB_NestedSet::addListener() – Add an event listener

Synopsis

require_once 'DB/NestedSet.php';

string DB_NestedSet::addListener ( string $event , &$listener , string $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

Add Listener

<?php
require_once('DB/NestedSet.php');
    
$nestedSet =& DB_NestedSet::factory('DB'$dsn$params);
    
$nestedSet->AddListener("nodeCreate""listener");
?>