Index: bp-core/bp-core-classes.php
===================================================================
--- bp-core/bp-core-classes.php	(revision 4200)
+++ bp-core/bp-core-classes.php	(working copy)
@@ -436,15 +436,77 @@
  */
 
 class BP_Core_Notification {
+	
+	/**
+	 * The notification id
+	 * 
+	 * @var integer
+	 * @access public
+	 */
 	var $id;
+	
+	/**
+	 * The ID to which the notification relates to within the component.
+	 * 
+	 * @var integer
+	 * @access public
+	 */
 	var $item_id;
+	
+	/**
+	 * The secondary ID to which the notification relates to within the component.
+	 * 
+	 * @var integer
+	 * @access public
+	 */
 	var $secondary_item_id = null;
+	
+	/**
+	 * The user ID for who the notification is for.
+	 * 
+	 * @var integer
+	 */
 	var $user_id;
+	
+	/**
+	 * The name of the component that the notification is for. 
+	 *
+	 * @var string
+	 * @access public
+	 */
 	var $component_name;
+	
+	/**
+	 * The action within the component which the notification is related to.
+	 * 
+	 * @var string
+	 * @access public
+	 */
 	var $component_action;
+	
+	/**
+	 * The date the notification was created.
+	 * 
+	 * @var string
+	 * @access public
+	 */
 	var $date_notified;
+	
+	/**
+	 * Is the notification new or has it already been read.
+	 * 
+	 * @var boolean
+	 * @access public
+	 */
 	var $is_new;
 
+	
+	/**
+	 * Checks to see if an notification id has been given 
+	 * if it has calls populate. 
+	 * 
+	 * @param integer $id
+	 */
 	function bp_core_notification( $id = false ) {
 		if ( $id ) {
 			$this->id = $id;
@@ -452,6 +514,10 @@
 		}
 	}
 
+	/**
+	 * Fetches the notification data from the database.
+	 * 
+	 */
 	function populate() {
 		global $wpdb, $bp;
 
@@ -466,6 +532,12 @@
 		}
 	}
 
+	/**
+	 * Saves the data from the class members to the 
+	 * notification table. If $id is a true value
+	 * updates the table otherwises inserts.
+	 * 
+	 */
 	function save() {
 		global $wpdb, $bp;
 
@@ -486,24 +558,57 @@
 
 	/** Static functions ******************************************************/
 
+	/**
+	 *  
+	 *
+	 * @param integer $user_id
+	 * @param integer $notification_id
+	 * @static
+	 */
 	function check_access( $user_id, $notification_id ) {
 		global $wpdb, $bp;
 
 		return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->core->table_name_notifications} WHERE id = %d AND user_id = %d", $notification_id, $user_id ) );
 	}
 
+	/**
+	 * Fetches all the notifications in the database for a specific user.
+	 * 
+	 * @param integer $user_id The ID for the user who we wish to fetch all the notifications for
+	 * @static
+	 */
 	function get_all_for_user( $user_id ) {
 		global $wpdb, $bp;
 
  		return $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->core->table_name_notifications} WHERE user_id = %d AND is_new = 1", $user_id ) );
 	}
 
+	/**
+	 * Delete all the notifications for a user based on 
+	 * the component name and action. 
+	 *  
+	 * @param integer $user_id
+	 * @param string $component_name
+	 * @param string $component_action
+	 * @static
+	 */
 	function delete_for_user_by_type( $user_id, $component_name, $component_action ) {
 		global $wpdb, $bp;
 
 		return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->core->table_name_notifications} WHERE user_id = %d AND component_name = %s AND component_action = %s", $user_id, $component_name, $component_action ) );
 	}
-
+	
+	/**
+	 * Delete a notifications that have a specific item id 
+	 * for a component and action.
+	 *
+	 * @param integer $user_id The ID of the user who the noticifications are for.
+	 * @param integer $item_id The item ID the notifications we wish to delete.
+	 * @param string $component_name The name of the component the notifications we wish to delete belong to.
+	 * @param string $component_action The action of the component the notifications we wish to delete belong to.
+	 * @param integer $secondary_item_id (optional) The secondary item id the notification we wish to use to select for deletion. 
+	 * @static
+	 */
 	function delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id ) {
 		global $wpdb, $bp;
 
@@ -512,12 +617,32 @@
 		return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->core->table_name_notifications} WHERE user_id = %d AND item_id = %d AND component_name = %s AND component_action = %s{$secondary_item_sql}", $user_id, $item_id, $component_name, $component_action ) );
 	}
 
+	/**
+	 * Deletes all the notifications sent by a specific user via 
+	 * component and action. 
+	 * 
+	 * @param integer $user_id The ID of the user whos sent notifications we wish to delete.
+	 * @param string $component_name The name of the component the notification was sent from.
+	 * @param string $component_action The action of the component the notification was sent from.
+	 * @static
+	 */
 	function delete_from_user_by_type( $user_id, $component_name, $component_action ) {
 		global $wpdb, $bp;
 
 		return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->core->table_name_notifications} WHERE item_id = %d AND component_name = %s AND component_action = %s", $user_id, $component_name, $component_action ) );
 	}
 
+	/**
+	 * Deletes all the notifications for all users where a item 
+	 * id (and optional secondary item id) and sent the defined
+	 * component and action.
+	 * 
+	 * @param string $item_id The item id that they notifications are to be for.
+	 * @param string $component_name The component that the notifications are to be from.
+	 * @param string $component_action The action that the notificationsa are to be from.
+	 * @param string $secondary_item_id Optional secondary item id that the notifications are to have.
+	 * @static
+	 */
 	function delete_all_by_type( $item_id, $component_name, $component_action, $secondary_item_id ) {
 		global $wpdb, $bp;
 

