diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-05-11 20:33:23 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-05-11 20:33:56 +0200 |
commit | b40f9670ae28bfacc899a6fe734bd6d4b512a83d (patch) | |
tree | 0ff649a59de4ab360c63ee09e434c1a2d590c283 /lib/hook.php | |
parent | 736739bbbda2e9930b7bdcf79f43a28fad4d1d5d (diff) | |
download | nextcloud-server-b40f9670ae28bfacc899a6fe734bd6d4b512a83d.tar.gz nextcloud-server-b40f9670ae28bfacc899a6fe734bd6d4b512a83d.zip |
allow clearing hooks and fileproxies
Diffstat (limited to 'lib/hook.php')
-rw-r--r-- | lib/hook.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/hook.php b/lib/hook.php index 83a16106bf0..b53755310e0 100644 --- a/lib/hook.php +++ b/lib/hook.php @@ -65,5 +65,22 @@ class OC_Hook{ // return true return true; } + + /** + * clear hooks + * @param string signalclass + * @param string signalname + */ + static public function clear($signalclass='', $signalname=''){ + if($signalclass){ + if($signalname){ + self::$registered[$signalclass][$signalname]=array(); + }else{ + self::$registered[$signalclass]=array(); + } + }else{ + self::$registered=array(); + } + } } |