[ Index ]

PHP Cross Reference of Eventum

title

Body

[close]

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

(no description)

File Size: 974 lines (33 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 2 files
 include/class.date.php
 include/customer/class.abstract_customer_backend.php

Defines 1 class

Example_Customer_Backend:: (38 methods):
  connect()
  getName()
  usesSupportLevels()
  getContractStatus()
  getCustomerTitlesByIssues()
  getSupportLevelsByIssues()
  getDetails()
  getAssocList()
  getTitle()
  getTitles()
  getContactEmailAssocList()
  getCustomerIDByEmails()
  getOverallStats()
  getProfile()
  getContactDetails()
  getCustomerIDsLikeEmail()
  lookup()
  notifyCustomerIssue()
  getSupportLevelAssocList()
  getSupportLevelID()
  getListBySupportLevel()
  getGroupedSupportLevels()
  isAllowedSupportContact()
  getCustomerInfoFromEmails()
  getExpirationOffset()
  getContactLoginDetails()
  getContractEndDate()
  getSalesAccountManager()
  getContractStartDate()
  getNewIssueMessage()
  hasMinimumResponseTime()
  getMinimumResponseTime()
  getMaximumFirstResponseTime()
  sendExpirationNotice()
  notifyIssueClosed()
  notifyEmailConvertedIntoIssue()
  notifyAutoCreatedIssue()
  getContractDetails()


Class: Example_Customer_Backend  - X-Ref

Example customer backend. This does not cover all functionality, but should provide an idea
on how to implement a backend.

connect()   X-Ref
Overide the connect method to populate a variable instead of connecting to a database


getName()   X-Ref
Returns the name of the backend

return: string The name of the backend

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

return: boolean True if the project uses support levels.

getContractStatus($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 $customer_id The customer ID
return: string The contract status

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

param: array $result The list of issues

getSupportLevelsByIssues(&$result)   X-Ref
Retrieves the support levels associated with the given list of issues.

param: array $result The list of issues

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

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

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

return: array An associated array of customers.

getTitle($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($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($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($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($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($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

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

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

getCustomerIDsLikeEmail($email)   X-Ref
Returns the list of customer IDs that are associated with the given
email value (wildcards welcome). Contrary to the name of the method, this
also works with customer names

param: string $email The email value
return: array The list of customer IDs

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

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($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 $issue_id The issue ID
param: integer $contact_id The customer contact ID
return: void

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

return: array The list of available support levels

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

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

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

param: integer/array $support_level_id The support level ID or an array of support level IDs
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()   X-Ref
Returns an array of support levels grouped together.

return: array an array of support levels.

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

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

getCustomerInfoFromEmails($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: array $sup_ids The list of support email IDs
return: array The customer and customer contact ID

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

return: integer The customer login grace period

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

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

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

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

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

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

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

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

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

param: array $customer_id Customer ID.

hasMinimumResponseTime($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 $customer_id The customer ID
return: boolean

getMinimumResponseTime($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($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

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

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

notifyIssueClosed($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 $issue_id The issue ID
param: integer $contact_id The customer contact ID
return: void

notifyEmailConvertedIntoIssue($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 $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($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 $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

getContractDetails($contact_id, $restrict_expiration)   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



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