Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 18867 программистов и 1635 роботов. Сейчас ищет 2031 программист ...
DB_NestedSet::triggerEvent
Вернуться к: DB_NestedSet
DB_NestedSet::triggerEvent
DB_NestedSet::triggerEvent() – Triggers and event an calls the event listeners
Synopsis
require_once 'DB/NestedSet.php';
bool DB_NestedSet::triggerEvent ( string $event , &$node , array $eparams = false , object $ )
This package is not documented yet.
Parameter
- string $event
-
The Event that occured
- &$node
-
Node
- array $eparams
-
A associative array of params which may be needed by the handler
- object $node
-
A Reference to the node object which was subject to changes
Throws
throws no exceptions thrown
Note
This function can not be called statically.
Example
Trigger Event
<?php
require_once('DB/NestedSet.php');
$nestedSet =& DB_NestedSet::factory('DB', $dsn, $params);
$nestedSet->AddListener("nodeCreate", "listener");
$parent = $nestedSet->createRootNode(array('name' => 'rootnode'), false, true);
$node = $nestedSet->createSubNode($parent, array('name' => "node"));
$nestedSet->TriggerEvent("nodeDelete", $node);
?>
Вернуться к: DB_NestedSet