diff options
author | zotlabs <mike@macgirvin.com> | 2017-11-04 18:18:10 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-11-04 18:18:10 -0700 |
commit | 7ef641e256aba64978ea9a41a31b78e4af5c68b0 (patch) | |
tree | ac7e80030e53bc0c91fb6a3757e04e4e65fb1b3b /Zotlabs/Extend/Hook.php | |
parent | 1d903655afdd8e49942c6d6c9ca1a7feadeaaa82 (diff) | |
parent | 6995d54a3cc162d87f881f6e206fa356230fd9e8 (diff) | |
download | volse-hubzilla-7ef641e256aba64978ea9a41a31b78e4af5c68b0.tar.gz volse-hubzilla-7ef641e256aba64978ea9a41a31b78e4af5c68b0.tar.bz2 volse-hubzilla-7ef641e256aba64978ea9a41a31b78e4af5c68b0.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Extend/Hook.php')
-rw-r--r-- | Zotlabs/Extend/Hook.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Zotlabs/Extend/Hook.php b/Zotlabs/Extend/Hook.php index c6f9ea850..81260ead6 100644 --- a/Zotlabs/Extend/Hook.php +++ b/Zotlabs/Extend/Hook.php @@ -2,7 +2,12 @@ namespace Zotlabs\Extend; +use App; +/** + * @brief Hook class. + * + */ class Hook { static public function register($hook,$file,$function,$version = 1,$priority = 0) { @@ -64,11 +69,14 @@ class Hook { return $r; } - // unregister all hooks with this file component. - // Useful for addon upgrades where you want to clean out old interfaces. - + /** + * @brief Unregister all hooks with this file component. + * + * Useful for addon upgrades where you want to clean out old interfaces. + * + * @param string $file + */ static public function unregister_by_file($file) { - $r = q("DELETE FROM hook WHERE file = '%s' ", dbesc($file) ); @@ -76,7 +84,6 @@ class Hook { return $r; } - /** * @brief Inserts a hook into a page request. * @@ -98,7 +105,6 @@ class Hook { * @param int $priority * currently not implemented in this function, would require the hook array to be resorted */ - static public function insert($hook, $fn, $version = 0, $priority = 0) { if(is_array($fn)) { $fn = serialize($fn); |