[ Index ]

PHP Cross Reference of Eventum

title

Body

[close]

/include/ -> class.notification.php (summary)

Class to handle all of the business logic related to sending email notifications on actions regarding the issues.

Author: João Prado Maia <jpm@mysql.com>
Version: 1.0
File Size: 2226 lines (89 kb)
Included or required: 11 times
Referenced: 0 times
Includes or requires: 14 files
 include/class.project.php
 include/class.mail.php
 include/class.template.php
 include/class.history.php
 include/class.user.php
 include/class.custom_field.php
 include/class.date.php
 include/class.misc.php
 include/class.auth.php
 include/class.priority.php
 include/class.error_handler.php
 include/class.prefs.php
 include/class.issue.php
 include/class.setup.php

Defines 1 class

Notification:: (41 methods):
  isSubscribedToEmails()
  getSubscribedEmails()
  getFixedFromHeader()
  isBounceMessage()
  isIssueRoutingSender()
  notifyNewEmail()
  getIssueDetails()
  getNote()
  getEmails()
  getAttachment()
  getUsersByIssue()
  notifyIssueUpdated()
  notifyStatusChange()
  notify()
  getLastNotifiedAddresses()
  notifySubscribers()
  notifyNewIssue()
  notifyAutoCreatedIssue()
  notifyEmailConvertedIntoIssue()
  notifyIRCAssignmentChange()
  notifyIRCBlockedMessage()
  notifyIRC()
  notifyUserAccount()
  notifyUserPassword()
  notifyNewUser()
  notifyAssignees()
  notifyNewAssignment()
  notifyAccountDetails()
  getSubscribers()
  getDetails()
  getSubscribedActions()
  getSubscriberListing()
  removeByIssues()
  remove()
  getSubscriber()
  getAllActions()
  getDefaultActions()
  subscribeUser()
  subscribeEmail()
  addType()
  update()


Class: Notification  - X-Ref

isSubscribedToEmails($issue_id, $email)   X-Ref
Method used to check whether a given email address is subsbribed to
email notifications for a given issue.

param: integer $issue_id The issue ID
param: string $email The email address
return: boolean

getSubscribedEmails($issue_id, $type)   X-Ref
Method used to get the list of email addresses currently
subscribed to a notification type for a given issue.

param: integer $issue_id The issue ID
param: string $type The notification type
return: array The list of email addresses

getFixedFromHeader($issue_id, $sender, $type)   X-Ref
Method used to build a properly encoded email address that will be
used by the email/note routing system.

param: integer $issue_id The issue ID
param: string $sender The email address of the sender
param: string $type Whether this is a note or email routing message
return: string The properly encoded email address

isBounceMessage($email)   X-Ref
Method used to check whether the current sender of the email is the
mailer daemon responsible for dealing with bounces.

param: string $email The email address to check against
return: boolean

isIssueRoutingSender($issue_id, $sender)   X-Ref
Method used to check whether the given sender email address is
the same as the issue routing email address.

param: integer $issue_id The issue ID
param: string $sender The address of the sender
return: boolean

notifyNewEmail($usr_id, $issue_id, $message, $internal_only = FALSE, $assignee_only = FALSE, $type = '', $sup_id = false)   X-Ref
Method used to forward the new email to the list of subscribers.

param: integer $user_id The user ID of the person performing this action
param: integer $issue_id The issue ID
param: array $message An array containing the email
param: boolean $internal_only Whether the email should only be redirected to internal users or not
param: boolean $assignee_only Whether the email should only be sent to the assignee
param: boolean $type The type of email this is
param: integer $sup_id the ID of this email
return: void

getIssueDetails($issue_id)   X-Ref
Method used to get the details of a given issue.

param: integer $issue_id The issue ID
return: array The issue details

getNote($issue_id, $note_id)   X-Ref
Method used to get the details of a given note and issue.

param: integer $issue_id The issue ID
param: integer $note_id The note ID
return: array The details of the note / issue

getEmails($issue_id, $sup_ids)   X-Ref
Method used to get the details of a given issue and its
associated emails.

param: integer $issue_id The issue ID
param: array $sup_ids The list of associated emails
return: array The issue / emails details

getAttachment($issue_id, $attachment_id)   X-Ref
Method used to get the details of a given issue and attachment.

param: integer $issue_id The issue ID
param: integer $attachment_id The attachment ID
return: array The issue / attachment details

getUsersByIssue($issue_id, $type)   X-Ref
Method used to get the list of users / emails that are
subscribed for notifications of changes for a given issue.

param: integer $issue_id The issue ID
param: string $type The notification type
return: array The list of users / emails

notifyIssueUpdated($issue_id, $old, $new)   X-Ref
Method used to send a diff-style notification email to the issue
subscribers about updates to its attributes.

param: integer $issue_id The issue ID
param: array $old The old issue details
param: array $new The new issue details

notifyStatusChange($issue_id, $old_status, $new_status)   X-Ref
Method used to send a diff-style notification email to the issue
subscribers about status changes

param: integer $issue_id The issue ID
param: array $old_status The old issue status
param: array $new_status The new issue status

notify($issue_id, $type, $ids = FALSE, $internal_only = FALSE, $extra_recipients = FALSE)   X-Ref
Method used to send email notifications for a given issue.

param: integer $issue_id The issue ID
param: string $type The notification type
param: array $ids The list of entries that were changed
param: integer $internal_only Whether the notification should only be sent to internal users or not
return: void

getLastNotifiedAddresses($issue_id = null)   X-Ref
Method used to get list of addresses that were email sent to.

param: integer $issue_id The issue ID
return: array   list of addresse

notifySubscribers($issue_id, $emails, $type, $data, $subject, $internal_only, $type_id = false, $headers = false)   X-Ref
Method used to format and send the email notifications.

param: integer $issue_id The issue ID
param: array $emails The list of emails
param: string $type The notification type
param: array $data The issue details
param: string $subject The subject of the email
param: integer $type_id The ID of the event that triggered this notification (issue_id, sup_id, not_id, etc)
param: array $headers Any extra headers that need to be added to this email (Default false)
return: void

notifyNewIssue($prj_id, $issue_id, $exclude_list = array()   X-Ref
Method used to send an email notification to users that want
to be alerted when new issues are created in the system.

param: integer $prj_id The project ID
param: integer $issue_id The issue ID
param: array   $exclude_list The list of users NOT to notify.
return: void

notifyAutoCreatedIssue($prj_id, $issue_id, $sender, $date, $subject, $additional_recipient = false)   X-Ref
Method used to send an email notification to the sender of an
email message that was automatically converted into an issue.

param: integer $prj_id The project ID
param: integer $issue_id The issue ID
param: string $sender The sender of the email message (and the recipient of this notification)
param: string $date The arrival date of the email message
param: string $subject The subject line of the email message
param: string $additional_recipient The user who should recieve this email who is not the sender of the original email.
return: void

notifyEmailConvertedIntoIssue($prj_id, $issue_id, $sup_ids, $customer_id = FALSE)   X-Ref
Method used to send an email notification to the sender of a
set of email messages that were manually converted into an
issue.

param: integer $prj_id The project ID
param: integer $issue_id The issue ID
param: array $sup_ids The email IDs
param: integer $customer_id The customer ID
return: array The list of recipient emails

notifyIRCAssignmentChange($issue_id, $usr_id, $old, $new, $is_remote = FALSE)   X-Ref
Method used to send an IRC notification about changes in the assignment
list of an issue.

param: integer $issue_id The issue ID
param: integer $usr_id The person who is performing this change
param: array $old The old issue assignment list
param: array $new The new issue assignment list
param: boolean $is_remote Whether this change was made remotely or not

notifyIRCBlockedMessage($issue_id, $from)   X-Ref
Method used to send an IRC notification about a blocked email that was
saved into an internal note.

param: integer $issue_id The issue ID
param: string $from The sender of the blocked email message

notifyIRC($project_id, $notice, $issue_id = false)   X-Ref
Method used to save the IRC notification message in the queue table.

param: integer $project_id The ID of the project.
param: string  $notice The notification summary that should be displayed on IRC
param: integer $issue_id The issue ID
return: boolean

notifyUserAccount($usr_id)   X-Ref
Method used to send an email notification when the account
details of an user is changed.

param: integer $usr_id The user ID
return: void

notifyUserPassword($usr_id, $password)   X-Ref
Method used to send an email notification when the account
password of an user is changed.

param: integer $usr_id The user ID
param: string $password The user' password
return: void

notifyNewUser($usr_id, $password)   X-Ref
Method used to send an email notification when a new user
account is created.

param: integer $usr_id The user ID
param: string $password The user' password
return: void

notifyAssignees($issue_id, $type, $data, $title = '')   X-Ref
Send an email to all issue assignees

param: integer $issue_id The ID of the issue
param: string $type The type of notification to send
param: array $data Any extra data to pass to the template

notifyNewAssignment($users, $issue_id)   X-Ref
Method used to send an email notification when an issue is
assigned to an user.

param: array $users The list of users
param: integer $issue_id The issue ID
return: void

notifyAccountDetails($usr_id)   X-Ref
Method used to send the account details of an user.

param: integer $usr_id The user ID
return: void

getSubscribers($issue_id, $type = false, $min_role = false)   X-Ref
Method used to get the list of subscribers for a given issue.

param: integer $issue_id The issue ID
param: integer $type The type of subscription
param: integer $min_role Only show subscribers with this role or above
return: array An array containing 2 elements. Each a list of subscribers, separated by commas

getDetails($sub_id)   X-Ref
Method used to get the details of a given email notification
subscription.

param: integer $sub_id The subcription ID
return: array The details of the subscription

getSubscribedActions($sub_id)   X-Ref
Method used to get the subscribed actions for a given
subscription ID.

param: integer $sub_id The subcription ID
return: array The subscribed actions

getSubscriberListing($issue_id)   X-Ref
Method used to get the list of subscribers for a given issue.

param: integer $issue_id The issue ID
return: array The list of subscribers

removeByIssues($ids)   X-Ref
Method used to remove all subscriptions associated with a given
set of issues.

param: array $ids The list of issues
return: boolean

remove($items)   X-Ref
Method used to remove all rows associated with a set of
subscription IDs

param: array $items The list of subscription IDs
return: boolean

getSubscriber($sub_id)   X-Ref
Returns the email address associated with a notification list
subscription, user based or otherwise.

param: integer $sub_id The subscription ID
return: string The email address

getAllActions()   X-Ref
Method used to get the full list of possible notification actions.

return: array All of the possible notification actions

getDefaultActions()   X-Ref
Method used to get the full list of default notification
actions.

return: array The list of default notification actions

subscribeUser($usr_id, $issue_id, $subscriber_usr_id, $actions, $add_history = TRUE)   X-Ref
Method used to subscribe an user to a set of actions in an issue.

param: integer $usr_id The user ID of the person performing this action
param: integer $issue_id The issue ID
param: integer $subscriber_usr_id The user ID of the subscriber
param: array $actions The list of actions to subscribe this user to
param: boolean $add_history Whether to add a history entry about this change or not
return: integer 1 if the update worked, -1 otherwise

subscribeEmail($usr_id, $issue_id, $form_email, $actions)   X-Ref
Method used to add a new subscriber manually, by using the
email notification interface.

param: integer $usr_id The user ID of the person performing this change
param: integer $issue_id The issue ID
param: string $form_email The email address to subscribe
param: array $actions The actions to subcribe to
return: integer 1 if the update worked, -1 otherwise

addType($sub_id, $type)   X-Ref
Method used to add the subscription type to the given
subscription.

param: integer $sub_id The subscription ID
param: string $type The subscription type
return: void

update($sub_id)   X-Ref
Method used to update the details of a given subscription.

param: integer $sub_id The subscription ID
return: integer 1 if the update worked, -1 otherwise



Generated: Wed Dec 19 21:21:33 2007 Cross-referenced by PHPXref 0.7