summaryrefslogtreecommitdiff
path: root/app/Core/Plugin/Hook.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Core/Plugin/Hook.php')
-rw-r--r--app/Core/Plugin/Hook.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/Core/Plugin/Hook.php b/app/Core/Plugin/Hook.php
index ade69150..ca197937 100644
--- a/app/Core/Plugin/Hook.php
+++ b/app/Core/Plugin/Hook.php
@@ -96,4 +96,21 @@ class Hook
return null;
}
+
+ /**
+ * Hook with reference
+ *
+ * @access public
+ * @param string $hook
+ * @param mixed $param
+ * @return mixed
+ */
+ public function reference($hook, &$param)
+ {
+ foreach ($this->getListeners($hook) as $listener) {
+ $listener($param);
+ }
+
+ return $param;
+ }
}