aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Extend/Hook.php
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-09-05 00:23:42 +0200
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-11-03 23:04:27 +0100
commit1a737be2b408135177a9e94dcffd0f68c0aca90b (patch)
tree17e565688120ef94db2fa1e9635d0d55f2e43c58 /Zotlabs/Extend/Hook.php
parent0ce7358f0f00cb000562dc34be13459eb5779c18 (diff)
downloadvolse-hubzilla-1a737be2b408135177a9e94dcffd0f68c0aca90b.tar.gz
volse-hubzilla-1a737be2b408135177a9e94dcffd0f68c0aca90b.tar.bz2
volse-hubzilla-1a737be2b408135177a9e94dcffd0f68c0aca90b.zip
:bulb: Improving Doxygen documentation.
Fix some Doxygen parsing errors. Improve hooks documentation.
Diffstat (limited to 'Zotlabs/Extend/Hook.php')
-rw-r--r--Zotlabs/Extend/Hook.php18
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);