Class Whups_Driver

Description

Base class for Whups' storage backend.

$Horde: whups/lib/Driver.php,v 1.200.2.6 2009/09/07 10:09:11 jan Exp $

Copyright 2001-2002 Robert E. Coyle <robertecoyle@hotmail.com> Copyright 2001-2009 The Horde Project (http://www.horde.org/)

See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://www.horde.org/licenses/bsdl.php.

  • author: Robert E. Coyle <robertecoyle@hotmail.com>
  • author: Jan Schneider <jan@horde.org>
  • todo: Needs updating to include method stubs for all required methods, to indicate what methods need to be implemented by other backends.

Located in /lib/Driver.php (line 20)


	
			
Direct descendents
Class Description
 class Whups_Driver_sql Whups_Driver_sql class - implements a Whups backend for the PEAR::DB abstraction layer.
Variable Summary
 array $_params
Method Summary
 Whups_Driver Whups_Driver ( $params)
 void deleteQueue (integer $queueId)
 void deleteReply (integer $reply)
 Whups_Driver factory ([string $driver = null], [array $params = null])
 void filterTicketsByState ( $tickets, [ $state_category = array()])
 string formatComments (array $comments)
 array getAllTicketAttributesWithNames ( $ticket_id)
 array getAttributesForType ([ $type = null])
 void getCategories ()
 void getHistory (integer $ticket_id)
 void getQueue ( $queueId)
 void getQueues ()
 void getVersion ( $version)
 void getVersionInfo ( $queue)
 void getVersions ( $queue, [ $all = false])
 void mail (integer $ticket_id, array $recipients, string $subject, string $message, string $from, boolean $reminder, [integer $queue_id = null], [boolean $is_new = false])
 void setAttributes ( $info,  &$ticket)
Variables
array $_params (line 25)
Methods
Constructor Whups_Driver (line 29)
Whups_Driver Whups_Driver ( $params)
  • $params
deleteQueue (line 288)

Deletes a queue.

Should be called by driver subclasses after successful removal from the backend. Takes only care of cleaning up queue permissions.

void deleteQueue (integer $queueId)
  • integer $queueId: The id of the queue being deleted.

Redefined in descendants as:
deleteReply (line 306)

Deletes a form reply.

Should be called by driver subclasses after successful removal from the backend. Takes only care of cleaning up reply permissions.

void deleteReply (integer $reply)
  • integer $reply: The id of the form reply being deleted.

Redefined in descendants as:
factory (line 549)

Attempts to return a concrete Whups_Driver instance based on $driver.

  • return: The newly created concrete Whups_Driver instance.
Whups_Driver factory ([string $driver = null], [array $params = null])
  • string $driver: The type of concrete Driver subclass to return.
  • array $params: A hash containing any additional configuration or connection parameters a subclass might need.
filterTicketsByState (line 318)
void filterTicketsByState ( $tickets, [ $state_category = array()])
  • $tickets
  • $state_category
formatComments (line 522)

Converts a changeset array to a plain text comment snippet.

  • return: The formatted comment text, if any.
string formatComments (array $comments)
  • array $comments: A changeset list.
getAllTicketAttributesWithNames (line 258)

Returns the attributes for a specific ticket.

This method will check if external attributes need to be fetched from hooks or whether to use the standard ones defined within Whups.

  • return: List of attributes.
array getAllTicketAttributesWithNames ( $ticket_id)
  • $ticket_id
getAttributesForType (line 229)

Returns the attributes for a specific ticket type.

This method will check if external attributes need to be fetched from hooks or whether to use the standard ones defined within Whups.

  • return: List of attributes.
array getAttributesForType ([ $type = null])
  • $type
getCategories (line 211)
void getCategories ()
getHistory (line 54)
void getHistory (integer $ticket_id)
  • integer $ticket_id
getQueue (line 143)
void getQueue ( $queueId)
  • $queueId
getQueues (line 151)
void getQueues ()
getVersion (line 203)
void getVersion ( $version)
  • $version
getVersionInfo (line 158)
void getVersionInfo ( $queue)
  • $queue
getVersions (line 167)

Returns a hash of versions suitable for select lists.

void getVersions ( $queue, [ $all = false])
  • $queue
  • $all
mail (line 351)

Sends email notifications to a list of recipients.

We do some ugly work in here to make sure that no one gets comments mailed to them that they shouldn't see (because of group permissions).

void mail (integer $ticket_id, array $recipients, string $subject, string $message, string $from, boolean $reminder, [integer $queue_id = null], [boolean $is_new = false])
  • integer $ticket_id: The ticket id.
  • array $recipients: The list of recipients.
  • string $subject: The email subject.
  • string $message: The email message text.
  • string $from: The email sender.
  • boolean $reminder: Whether this is reminder email (no ticket changes).
  • integer $queue_id: The queue id.
  • boolean $is_new: Whether a ticket has been created, if notifying about a ticket.
setAttributes (line 36)
void setAttributes ( $info,  &$ticket)
  • $info
  • &$ticket

Documentation generated on Sun, 30 Jan 2011 05:41:41 +0000 by phpDocumentor 1.4.3