unset( self::$handlers[$name] );
}
-
/**
* Attach an event handler to a given hook
*
* @param $event String: event name
* @param $args Array: parameters passed to hook functions
*
+ * @throws MWException
+ * @throws FatalError
* @return Boolean True if no handler aborted the hook
*/
public static function run( $event, $args = array() ) {
return true;
}
+ wfProfileIn( 'hook: ' . $event );
$hooks = self::getHandlers( $event );
foreach ( $hooks as $hook ) {
);
}
} elseif ( !$retval ) {
+ wfProfileOut( 'hook: ' . $event );
return false;
}
}
+ wfProfileOut( 'hook: ' . $event );
return true;
}