[ PHPXref.com ] [ Generated: Sun Jul 20 17:33:21 2008 ] [ Eventum 1.7.1 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

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

(no description)

File Size: 1285 lines (42 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 1 file
 include/class.misc.php

Defines 1 class

Customer:: (64 methods):
  getBackendList()
  _getBackendNameByProject()
  _getBackend()
  hasCustomerIntegration()
  getBackendImplementationName()
  doesBackendUseSupportLevels()
  getContractStatus()
  getCustomerTitlesByIssues()
  getDetails()
  isRedeemedIncident()
  getRedeemedIncidentDetails()
  updateRedeemedIncidents()
  flagIncident()
  unflagIncident()
  hasIncidentsLeft()
  hasPerIncidentContract()
  getTotalIncidents()
  getIncidentsRemaining()
  getIncidentTypes()
  sendIncidentLimitNotice()
  getAssocList()
  getTitle()
  getTitles()
  getContactEmailAssocList()
  getCustomerIDByEmails()
  getOverallStats()
  getProfile()
  getContractDetails()
  getContactDetails()
  getCustomerIDsLikeEmail()
  notifyIssueClosed()
  lookup()
  notifyCustomerIssue()
  getSupportLevelAssocList()
  getSupportLevelID()
  getListBySupportLevel()
  getGroupedSupportLevels()
  sendExpirationNotice()
  isAllowedSupportContact()
  getCustomerInfoFromEmails()
  notifyEmailConvertedIntoIssue()
  notifyAutoCreatedIssue()
  getExpirationOffset()
  getContactLoginDetails()
  getContractEndDate()
  getSalesAccountManager()
  getContractStartDate()
  getNewIssueMessage()
  getBusinessHours()
  hasMinimumResponseTime()
  getMinimumResponseTime()
  getMaximumFirstResponseTime()
  getAccountManagerList()
  insertAccountManager()
  getAccountManagerDetails()
  updateAccountManager()
  removeAccountManager()
  getAccountManagers()
  getNoteDetailsByCustomer()
  getNoteDetailsByID()
  getNoteList()
  updateNote()
  insertNote()
  removeNotes()


Class: Customer  - X-Ref

getBackendList()   X-Ref
Returns the list of available customer backends by listing the class
files in the backend directory.

return: array Associative array of filename => name

_getBackendNameByProject($prj_id)   X-Ref
Returns the customer backend class file associated with the given
project ID.

param: integer $prj_id The project ID
return: string The customer backend class filename

_getBackend($prj_id)   X-Ref
Includes the appropriate customer backend class associated with the
given project ID, instantiates it and returns the class.

param: integer $prj_id The project ID
return: boolean

hasCustomerIntegration($prj_id)   X-Ref
Checks whether the given project ID is setup to use customer integration
or not.

param: integer $prj_id The project ID
return: boolean

getBackendImplementationName($prj_id)   X-Ref
No description

doesBackendUseSupportLevels($prj_id)   X-Ref
Returns true if the backend uses support levels, false otherwise

param: integer $prj_id The project ID
return: boolean True if the project uses support levels.

getContractStatus($prj_id, $customer_id)   X-Ref
Returns the contract status associated with the given customer ID.
Possible return values are 'active', 'in_grace_period' and 'expired'.

param: integer $prj_id The project ID
param: integer $customer_id The customer ID
return: string The contract status

getCustomerTitlesByIssues($prj_id, &$result)   X-Ref
Retrieves the customer titles associated with the given list of issues.

param: integer $prj_id The project ID
param: array $result The list of issues

getDetails($prj_id, $customer_id, $force_refresh = false)   X-Ref
Method used to get the details of the given customer.

param: integer $prj_id The project ID
param: integer $customer_id The customer ID
param: boolean $force_refresh If the cache should not be used.
return: array The customer details

isRedeemedIncident($prj_id, $issue_id, $incident_type = false)   X-Ref
Returns true if this issue has been counted a valid incident

param: integer $prj_id The project ID
param: integer $issue_id The ID of the issue
param: integer $incident_type The type of incident
return: boolean True if this is a redeemed incident.

getRedeemedIncidentDetails($prj_id, $issue_id)   X-Ref
Returns an array of the curently redeemed incident types for the issue.

param: integer $prj_id The project ID
return: array An array containing the redeemed incident types

updateRedeemedIncidents($prj_id, $issue_id, $data)   X-Ref
Updates the incident counts

param: integer $prj_id The project ID
param: integer $issue_id The issue ID
param: array $data An array of data containing which incident types to update.
return: integer 1 if all updates were successful, -1 or -2 otherwise.

flagIncident($prj_id, $issue_id, $incident_type)   X-Ref
Marks an issue as a redeemed incident.

param: integer $prj_id The project ID
param: integer $issue_id The ID of the issue
param: integer $incident_type The type of incident

unflagIncident($prj_id, $issue_id, $incident_type)   X-Ref
Marks an issue as not a redeemed incident.

param: integer $prj_id The project ID
param: integer $issue_id The ID of the issue
param: integer $incident_type The type of incident

hasIncidentsLeft($prj_id, $customer_id, $incident_type = false)   X-Ref
Checks whether the active per-incident contract associated with the given
customer ID has any incidents available to be redeemed.

param: integer $prj_id The project ID
param: integer $customer_id The customer ID
param: integer $incident_type The type of incident
return: boolean

hasPerIncidentContract($prj_id, $customer_id)   X-Ref
Checks whether the active contract associated with the given customer ID
is a per-incident contract or not.

param: integer $prj_id The project ID
param: integer $customer_id The customer ID
return: boolean

getTotalIncidents($prj_id, $support_no, $incident_type)   X-Ref
Returns the total number of allowed incidents for the given support
contract ID.

param: integer $prj_id The project ID
param: integer $support_no The support contract ID
param: integer $incident_type The type of incident
return: integer The total number of incidents

getIncidentsRemaining($prj_id, $support_no, $incident_type)   X-Ref
Returns the number of incidents remaining for the given support
contract ID.

param: integer $prj_id The project ID
param: integer $support_no The support contract ID
param: integer $incident_type The type of incident
return: integer The number of incidents remaining.

getIncidentTypes($prj_id)   X-Ref
Returns the incident types available.

param: integer $prj_id The project ID
return: array An array of per incident types

sendIncidentLimitNotice($prj_id, $contact_id, $customer_id, $new_issue = false)   X-Ref
Method used to send a notice that the per-incident limit being reached.

param: integer $prj_id The project ID
param: integer $contact_id The customer contact ID
param: integer $customer_id The customer ID
param: boolean $new_issue If the customer just tried to create a new issue.
return: void

getAssocList($prj_id)   X-Ref
Returns a list of customers (companies) in the customer database.

param: integer $prj_id The project ID
return: array An associated array of customers.

getTitle($prj_id, $customer_id)   X-Ref
Method used to get the customer names for the given customer id.

param: integer $customer_id The customer ID
return: string The customer name

getTitles($prj_id, $customer_ids)   X-Ref
Method used to get an associative array of the customer names
for the given list of customer ids.

param: array $customer_ids The list of customers
return: array The associative array of customer id => customer name

getContactEmailAssocList($prj_id, $customer_id)   X-Ref
Method used to get the list of email addresses associated with the
contacts of a given customer.

param: integer $customer_id The customer ID
return: array The list of email addresses

getCustomerIDByEmails($prj_id, $emails)   X-Ref
Method used to get the customer and customer contact IDs associated
with a given list of email addresses.

param: array $emails The list of email addresses
return: array The customer and customer contact ID

getOverallStats($prj_id, $customer_id)   X-Ref
Method used to get the overall statistics of issues in the system for a
given customer.

param: integer $customer_id The customer ID
return: array The customer related issue statistics

getProfile($prj_id, $usr_id)   X-Ref
Method used to build the overall customer profile from the information
stored in the customer database.

param: integer $usr_id The Eventum user ID
return: array The customer profile information

getContractDetails($prj_id, $contact_id, $restrict_expiration = TRUE)   X-Ref
Method used to get the contract details for a given customer contact.

param: integer $contact_id The customer contact ID
return: array The customer contract details

getContactDetails($prj_id, $contact_id)   X-Ref
Method used to get the details associated with a customer contact.

param: integer $prj_id The project ID
param: integer $contact_id The customer contact ID
return: array The contact details

getCustomerIDsLikeEmail($prj_id, $email)   X-Ref
Returns the list of customer IDs that are associated with the given
email value (wildcards welcome).

param: integer $prj_id The project ID
param: string $email The email value
return: array The list of customer IDs

notifyIssueClosed($prj_id, $issue_id, $contact_id)   X-Ref
Method used to notify the customer contact that an existing issue
associated with him was just marked as closed.

param: integer $prj_id The project ID
param: integer $issue_id The issue ID
param: integer $contact_id The customer contact ID
return: void

lookup($prj_id, $field, $value)   X-Ref
Performs a customer lookup and returns the matches, if
appropriate.

param: integer $prj_id The project ID
param: string $field The field that we are trying to search against
param: string $value The value that we are searching for
return: array The list of customers

notifyCustomerIssue($prj_id, $issue_id, $contact_id)   X-Ref
Method used to notify the customer contact that a new issue was just
created and associated with his Eventum user.

param: integer $prj_id The project ID
param: integer $issue_id The issue ID
param: integer $contact_id The customer contact ID
return: void

getSupportLevelAssocList($prj_id)   X-Ref
Method used to get the list of available support levels.

param: integer $prj_id The project ID
return: array The list of available support levels

getSupportLevelID($prj_id, $customer_id)   X-Ref
Returns the support level of the current support contract for a given
customer ID.

param: integer $prj_id The project ID
param: integer $customer_id The customer ID
return: string The support contract level

getListBySupportLevel($prj_id, $support_level_id, $support_options = false)   X-Ref
Returns the list of customer IDs for a given support contract level.

param: integer $prj_id The project ID
param: integer $support_level_id The support level ID
param: mixed $support_options An integer or array of integers indicating various options to get customers with.
return: array The list of customer IDs

getGroupedSupportLevels($prj_id)   X-Ref
Returns an array of support levels grouped together.

param: integer $prj_id The project ID
return: array an array of support levels.

sendExpirationNotice($prj_id, $contact_id, $is_expired = FALSE)   X-Ref
Method used to send an expiration notice.

param: integer $prj_id The project ID
param: integer $contact_id The customer contact ID
param: boolean $is_expired Whether this customer is expired or not
return: void

isAllowedSupportContact($prj_id, $customer_contact_id)   X-Ref
Checks whether the given technical contact ID is allowed in the current
support contract or not.

param: integer $prj_id The project ID
param: integer $customer_contact_id The customer technical contact ID
return: boolean

getCustomerInfoFromEmails($prj_id, $sup_ids)   X-Ref
Method used to get the associated customer and customer contact from
a given set of support emails. This is especially useful to automatically
associate an issue to the appropriate customer contact that sent a
support email.

param: integer $prj_id The project ID
param: array $sup_ids The list of support email IDs
return: array The customer and customer contact ID

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

notifyAutoCreatedIssue($prj_id, $issue_id, $sender, $date, $subject)   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
return: void

getExpirationOffset($prj_id)   X-Ref
Method used to get the customer login grace period (number of days).

param: integer $prj_id The project ID
return: integer The customer login grace period

getContactLoginDetails($prj_id, $contact_id)   X-Ref
Method used to get the details of the given customer contact.

param: integer $prj_id The project ID
param: integer $contact_id The customer contact ID
return: array The customer details

getContractEndDate($prj_id, $customer_id)   X-Ref
Returns the end date of the current support contract for a given
customer ID.

param: integer $prj_id The project ID
param: integer $customer_id The customer ID
return: string The support contract end date

getSalesAccountManager($prj_id, $customer_id)   X-Ref
Returns the name and email of the sales account manager of the given customer ID.

param: integer $prj_id The project ID
param: integer $customer_id The customer ID
return: array An array containing the name and email of the sales account manager

getContractStartDate($prj_id, $customer_id)   X-Ref
Returns the start date of the current support contract for a given
customer ID.

param: integer $prj_id The project ID
param: integer $customer_id The customer ID
return: string The support contract start date

getNewIssueMessage($prj_id, $customer_id)   X-Ref
Returns a message to be displayed to a customer on the top of the issue creation page.

param: integer $prj_id The project ID
param: array $customer_id Customer ID.

getBusinessHours($prj_id, $customer_id)   X-Ref
Return what business hours a customer falls into. Mainly used for international
customers.

param: integer $prj_id The project ID
param: integer $customer_id The customer ID
return: string The business hours

hasMinimumResponseTime($prj_id, $customer_id)   X-Ref
Checks whether the given customer has a support contract that
enforces limits for the minimum first response time or not.

param: integer $prj_id The project ID
param: integer $customer_id The customer ID
return: boolean

getMinimumResponseTime($prj_id, $customer_id)   X-Ref
Returns the minimum first response time in seconds for the
support level associated with the given customer.

param: integer $customer_id The customer ID
return: integer The minimum first response time

getMaximumFirstResponseTime($prj_id, $customer_id)   X-Ref
Returns the maximum first response time associated with the
support contract of the given customer.

param: integer $customer_id The customer ID
return: integer The maximum first response time, in seconds

getAccountManagerList()   X-Ref
Method used to get the list of technical account managers
currently available in the system.

return: array The list of account managers

insertAccountManager()   X-Ref
Method used to add a new association of Eventum user =>
customer ID. This association will provide the basis for a
new role of technical account manager in Eventum.

return: integer 1 if the insert worked properly, any other value otherwise

getAccountManagerDetails($cam_id)   X-Ref
Method used to get the details of a given account manager.

param: integer $cam_id The account manager ID
return: array The account manager details

updateAccountManager()   X-Ref
Method used to update the details of an account manager.

return: integer 1 if the update worked properly, any other value otherwise

removeAccountManager()   X-Ref
Method used to remove a technical account manager from the
system.

return: boolean

getAccountManagers($prj_id, $customer_id)   X-Ref
Method used to get the list of technical account managers for
a given customer ID.

param: integer $prj_id The project ID
param: integer $customer_id The customer ID
return: array The list of account managers

getNoteDetailsByCustomer($customer_id)   X-Ref
Returns any notes for for the specified customer.

param: integer $customer_id The customer ID
return: array An array containg the note details.

getNoteDetailsByID($cno_id)   X-Ref
Returns any note details for for the specified id.

param: integer $customer_id The customer ID
return: array An array containg the note details.

getNoteList()   X-Ref
Returns an array of notes for all customers.

return: array An array of notes.

updateNote($cno_id, $prj_id, $customer_id, $note)   X-Ref
Updates a note.

param: integer $cno_id The id of this note.
param: integer $prj_id The project ID
param: integer $customer_id The id of the customer.
param: string $note The text of this note.

insertNote($prj_id, $customer_id, $note)   X-Ref
Adds a quick note for the specified customer.

param: integer $prj_id The project ID
param: integer $customer_id The id of the customer.
param: string  $note The note to add.

removeNotes($ids)   X-Ref
Removes the selected notes from the database.

param: array $ids An array of cno_id's to be deleted.



[ Powered by PHPXref - Served by Debian GNU/Linux ]