/**
  * Adds all the events to the main Ushahidi application
  */
 public function add()
 {
     // Only add the events if we are on that controller
     if (stripos(Router::$current_uri, "admin/manage") !== false) {
         Event::add('ushahidi_action.nav_admin_manage', array('Sharing', 'sharing_admin_nav'));
     } elseif (Router::$controller == "main") {
         Event::add('ushahidi_action.header_scripts', array('Sharing', 'sharing_bar_js'));
         Event::add('ushahidi_action.main_sidebar_post_filters', array('Sharing', 'sharing_bar'));
     } elseif (stripos(Router::$current_uri, 'json') === 0 or stripos(Router::$current_uri, 'reports') === 0 or stripos(Router::$current_uri, 'api') === 0) {
         Sharing::process_get_param();
         Event::add('ushahidi_filter.get_incidents_sql', array('Sharing', 'get_incidents_sql'));
         Event::add('ushahidi_filter.fetch_incidents_set_params', array('Sharing', 'fetch_incidents_set_params'));
         Event::add('ushahidi_filter.json_alter_params', array('Sharing', 'json_alter_params'));
         Event::add('ushahidi_filter.json_alter_markers', array('Sharing', 'json_alter_markers'));
         if (stripos(Router::$current_uri, 'reports') === 0) {
             Event::add('ushahidi_filter.get_neighbouring_incidents_sql', array('Sharing', 'get_neighbouring_incidents_sql'));
             Event::add('ushahidi_action.report_filters_ui', array('Sharing', 'report_filters_ui'));
             Event::add('ushahidi_action.report_js_filterReportsAction', array('Sharing', 'report_js_filterReportsAction'));
         }
     }
 }