From 0153140a9bb945cc4f92d4e080224000c9dddfd0 Mon Sep 17 00:00:00 2001 From: nbm Date: Sun, 6 Nov 2005 10:49:24 +0000 Subject: [PATCH] Add a registry to handle triggers, user-configurable activities that can occur at various stages during an action (such as the "post-validator" stage of the "add document" action). --- lib/triggers/triggerregistry.inc.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+), 0 deletions(-) create mode 100644 lib/triggers/triggerregistry.inc.php diff --git a/lib/triggers/triggerregistry.inc.php b/lib/triggers/triggerregistry.inc.php new file mode 100644 index 0000000..7f9ecff --- /dev/null +++ b/lib/triggers/triggerregistry.inc.php @@ -0,0 +1,33 @@ +triggers)) { + $this->triggers[$action] = array(); + } + if (!array_key_exists($slot, $this->triggers[$action])) { + $this->triggers[$action][$slot] = array(); + } + $this->triggers[$action][$slot][$nsname] = array($name, $path, $nsname); + } + // }}} + + // {{{ getTriggers + function getTriggers($action, $slot) { + return $this->triggers[$action][$slot]; + } + // }}} +} + +?> -- libgit2 0.21.4