From b81613e5e57fd208e832637b6886abf9ec806c4b Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 14 Jul 2013 12:25:28 -0400 Subject: [ticket/11700] With namespaces interface will no longer be a valid classname PHPBB3-11700 --- phpBB/phpbb/notification/method/interface.php | 48 ------ .../phpbb/notification/method/method_interface.php | 48 ++++++ phpBB/phpbb/notification/type/interface.php | 189 --------------------- phpBB/phpbb/notification/type/type_interface.php | 189 +++++++++++++++++++++ 4 files changed, 237 insertions(+), 237 deletions(-) delete mode 100644 phpBB/phpbb/notification/method/interface.php create mode 100644 phpBB/phpbb/notification/method/method_interface.php delete mode 100644 phpBB/phpbb/notification/type/interface.php create mode 100644 phpBB/phpbb/notification/type/type_interface.php (limited to 'phpBB/phpbb/notification') diff --git a/phpBB/phpbb/notification/method/interface.php b/phpBB/phpbb/notification/method/interface.php deleted file mode 100644 index ef875942cc..0000000000 --- a/phpBB/phpbb/notification/method/interface.php +++ /dev/null @@ -1,48 +0,0 @@ - array of users and user types that should not receive notifications from this type because they've already been notified - * e.g.: array(2 => array(''), 3 => array('', 'email'), ...) - * - * @return array - */ - public function find_users_for_notification($type_data, $options); - - /** - * Users needed to query before this notification can be displayed - * - * @return array Array of user_ids - */ - public function users_to_query(); - - /** - * Get the special items to load - * - * @return array Data will be combined sent to load_special() so you can run a single query and get data required for this notification type - */ - public function get_load_special(); - - /** - * Load the special items - * - * @param array $data Data from get_load_special() - * @param array $notifications Array of notifications (key is notification_id, value is the notification objects) - */ - public function load_special($data, $notifications); - - /** - * Get the HTML formatted title of this notification - * - * @return string - */ - public function get_title(); - - /** - * Get the url to this item - * - * @return string URL - */ - public function get_url(); - - /** - * URL to unsubscribe to this notification - * - * @param string|bool $method Method name to unsubscribe from (email|jabber|etc), False to unsubscribe from all notifications for this item - */ - public function get_unsubscribe_url($method); - - /** - * Get the user's avatar (the user who caused the notification typically) - * - * @return string - */ - public function get_avatar(); - - /** - * Prepare to output the notification to the template - */ - public function prepare_for_display(); - - /** - * Get email template - * - * @return string|bool - */ - public function get_email_template(); - - /** - * Get email template variables - * - * @return array - */ - public function get_email_template_variables(); - - /** - * Pre create insert array function - * This allows you to perform certain actions, like run a query - * and load data, before create_insert_array() is run. The data - * returned from this function will be sent to create_insert_array(). - * - * @param array $type_data The type specific data - * @param array $notify_users Notify users list - * Formated from find_users_for_notification() - * @return array Whatever you want to send to create_insert_array(). - */ - public function pre_create_insert_array($type_data, $notify_users); - - /** - * Function for preparing the data for insertion in an SQL query - * (The service handles insertion) - * - * @param array $type_data The type specific data - * @param array $pre_create_data Data from pre_create_insert_array() - * - * @return array Array of data ready to be inserted into the database - */ - public function create_insert_array($type_data, $pre_create_data); - - /** - * Function for preparing the data for update in an SQL query - * (The service handles insertion) - * - * @param array $type_data Data unique to this notification type - * - * @return array Array of data ready to be updated in the database - */ - public function create_update_array($type_data); - - /** - * Mark this item read - * - * @param bool $return True to return a string containing the SQL code to update this item, False to execute it (Default: False) - * @return string - */ - public function mark_read($return); - - /** - * Mark this item unread - * - * @param bool $return True to return a string containing the SQL code to update this item, False to execute it (Default: False) - * @return string - */ - public function mark_unread($return); -} diff --git a/phpBB/phpbb/notification/type/type_interface.php b/phpBB/phpbb/notification/type/type_interface.php new file mode 100644 index 0000000000..f9c65f7286 --- /dev/null +++ b/phpBB/phpbb/notification/type/type_interface.php @@ -0,0 +1,189 @@ + array of users and user types that should not receive notifications from this type because they've already been notified + * e.g.: array(2 => array(''), 3 => array('', 'email'), ...) + * + * @return array + */ + public function find_users_for_notification($type_data, $options); + + /** + * Users needed to query before this notification can be displayed + * + * @return array Array of user_ids + */ + public function users_to_query(); + + /** + * Get the special items to load + * + * @return array Data will be combined sent to load_special() so you can run a single query and get data required for this notification type + */ + public function get_load_special(); + + /** + * Load the special items + * + * @param array $data Data from get_load_special() + * @param array $notifications Array of notifications (key is notification_id, value is the notification objects) + */ + public function load_special($data, $notifications); + + /** + * Get the HTML formatted title of this notification + * + * @return string + */ + public function get_title(); + + /** + * Get the url to this item + * + * @return string URL + */ + public function get_url(); + + /** + * URL to unsubscribe to this notification + * + * @param string|bool $method Method name to unsubscribe from (email|jabber|etc), False to unsubscribe from all notifications for this item + */ + public function get_unsubscribe_url($method); + + /** + * Get the user's avatar (the user who caused the notification typically) + * + * @return string + */ + public function get_avatar(); + + /** + * Prepare to output the notification to the template + */ + public function prepare_for_display(); + + /** + * Get email template + * + * @return string|bool + */ + public function get_email_template(); + + /** + * Get email template variables + * + * @return array + */ + public function get_email_template_variables(); + + /** + * Pre create insert array function + * This allows you to perform certain actions, like run a query + * and load data, before create_insert_array() is run. The data + * returned from this function will be sent to create_insert_array(). + * + * @param array $type_data The type specific data + * @param array $notify_users Notify users list + * Formated from find_users_for_notification() + * @return array Whatever you want to send to create_insert_array(). + */ + public function pre_create_insert_array($type_data, $notify_users); + + /** + * Function for preparing the data for insertion in an SQL query + * (The service handles insertion) + * + * @param array $type_data The type specific data + * @param array $pre_create_data Data from pre_create_insert_array() + * + * @return array Array of data ready to be inserted into the database + */ + public function create_insert_array($type_data, $pre_create_data); + + /** + * Function for preparing the data for update in an SQL query + * (The service handles insertion) + * + * @param array $type_data Data unique to this notification type + * + * @return array Array of data ready to be updated in the database + */ + public function create_update_array($type_data); + + /** + * Mark this item read + * + * @param bool $return True to return a string containing the SQL code to update this item, False to execute it (Default: False) + * @return string + */ + public function mark_read($return); + + /** + * Mark this item unread + * + * @param bool $return True to return a string containing the SQL code to update this item, False to execute it (Default: False) + * @return string + */ + public function mark_unread($return); +} -- cgit v1.2.1