diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-09-07 15:22:01 +0200 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-09-07 15:22:01 +0200 |
commit | 3829460ab8cbb6de65c53583a20fd04cbe7927dd (patch) | |
tree | 4dc24845a5eb31b17510a621e14c15b51f16bf7b /lib/hook.php | |
parent | 785aa751bb5f9a4bcdd677b96207550482e17d3c (diff) | |
download | nextcloud-server-3829460ab8cbb6de65c53583a20fd04cbe7927dd.tar.gz nextcloud-server-3829460ab8cbb6de65c53583a20fd04cbe7927dd.zip |
adding space between) and {
Diffstat (limited to 'lib/hook.php')
-rw-r--r-- | lib/hook.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/hook.php b/lib/hook.php index ee390d6cd5a..1bf80f604f6 100644 --- a/lib/hook.php +++ b/lib/hook.php @@ -19,12 +19,12 @@ class OC_Hook{ * * TODO: write example */ - static public function connect( $signalclass, $signalname, $slotclass, $slotname ){ + static public function connect( $signalclass, $signalname, $slotclass, $slotname ) { // Create the data structure - if( !array_key_exists( $signalclass, self::$registered )){ + if( !array_key_exists( $signalclass, self::$registered )) { self::$registered[$signalclass] = array(); } - if( !array_key_exists( $signalname, self::$registered[$signalclass] )){ + if( !array_key_exists( $signalname, self::$registered[$signalclass] )) { self::$registered[$signalclass][$signalname] = array(); } @@ -48,17 +48,17 @@ class OC_Hook{ * * TODO: write example */ - static public function emit( $signalclass, $signalname, $params = array()){ + static public function emit( $signalclass, $signalname, $params = array()) { // Return false if there are no slots - if( !array_key_exists( $signalclass, self::$registered )){ + if( !array_key_exists( $signalclass, self::$registered )) { return false; } - if( !array_key_exists( $signalname, self::$registered[$signalclass] )){ + if( !array_key_exists( $signalname, self::$registered[$signalclass] )) { return false; } // Call all slots - foreach( self::$registered[$signalclass][$signalname] as $i ){ + foreach( self::$registered[$signalclass][$signalname] as $i ) { call_user_func( array( $i["class"], $i["name"] ), $params ); } @@ -71,9 +71,9 @@ class OC_Hook{ * @param string signalclass * @param string signalname */ - static public function clear($signalclass='', $signalname=''){ - if($signalclass){ - if($signalname){ + static public function clear($signalclass='', $signalname='') { + if($signalclass) { + if($signalname) { self::$registered[$signalclass][$signalname]=array(); }else{ self::$registered[$signalclass]=array(); |