PHP Class Whups_Driver, horde

Copyright 2001-2002 Robert E. Coyle Copyright 2001-2016 Horde LLC (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 ([email protected])
Author: Jan Schneider ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_params array

Méthodes publiques

Méthode Description
__construct ( array $params ) : Whups_Driver_Base Constructor
deleteQueue ( integer $queueId ) Deletes a queue.
deleteReply ( integer $reply ) Deletes a form reply.
filterTicketsByState ( $tickets, $state_category = [] )
formatComments ( array $comments, integer $ticket ) : string Converts a changeset array to a plain text comment snippet.
getAllTicketAttributesWithNames ( $ticket_id ) : array Returns the attributes for a specific ticket.
getAttributesForType ( $type = null ) : array Returns the attributes for a ticket type.
getCategories ( )
getHistory ( integer $ticket_id, Horde_Form $form = null ) : array Fetch ticket history
getQueue ( $queueId )
getQueues ( )
getVersion ( $version )
getVersionInfo ( $queue )
getVersions ( $queue, $all = false ) Returns a hash of versions suitable for select lists.
mail ( array $opts ) Sends email notifications to a list of recipients.
setAttributes ( array $info, Whups_Ticket &$ticket ) Set ticket attributes

Méthodes protégées

Méthode Description
_json_decode ( $value ) : mixed Helper to decode attribute value, which may be a bare scalar value, or a json encoded structure that may contain large numeric strings that should not be taken as integers.
_serializeAttribute ( $value ) : string Returns a serialized value, if necessary.

Method Details

__construct() public méthode

Constructor
public __construct ( array $params ) : Whups_Driver_Base
$params array Parameter array.
Résultat Whups_Driver_Base

_json_decode() protected méthode

Helper to decode attribute value, which may be a bare scalar value, or a json encoded structure that may contain large numeric strings that should not be taken as integers.
protected _json_decode ( $value ) : mixed
Résultat mixed The decoded value.

_serializeAttribute() protected méthode

Returns a serialized value, if necessary.
protected _serializeAttribute ( $value ) : string
Résultat string The JSON encoded value if not already a string.

deleteQueue() public méthode

Should be called by driver subclasses after successful removal from the backend. Takes only care of cleaning up queue permissions.
public deleteQueue ( integer $queueId )
$queueId integer The id of the queue being deleted.

deleteReply() public méthode

Should be called by driver subclasses after successful removal from the backend. Takes only care of cleaning up reply permissions.
public deleteReply ( integer $reply )
$reply integer The id of the form reply being deleted.

filterTicketsByState() public méthode

public filterTicketsByState ( $tickets, $state_category = [] )

formatComments() public méthode

Converts a changeset array to a plain text comment snippet.
public formatComments ( array $comments, integer $ticket ) : string
$comments array A changeset list.
$ticket integer A ticket ID.
Résultat string The formatted comment text, if any.

getAllTicketAttributesWithNames() public méthode

This method will check if external attributes need to be fetched from hooks or whether to use the standard ones defined within Whups.
public getAllTicketAttributesWithNames ( $ticket_id ) : array
Résultat array List of attributes.

getAttributesForType() public méthode

Returns the attributes for a ticket type.
public getAttributesForType ( $type = null ) : array
Résultat array A list of attributes.

getCategories() public méthode

public getCategories ( )

getHistory() public méthode

Fetch ticket history
public getHistory ( integer $ticket_id, Horde_Form $form = null ) : array
$ticket_id integer The ticket to fetch history for.
$form Horde_Form
Résultat array

getQueue() public méthode

public getQueue ( $queueId )

getQueues() public méthode

public getQueues ( )

getVersion() public méthode

public getVersion ( $version )

getVersionInfo() public méthode

public getVersionInfo ( $queue )

getVersions() public méthode

Returns a hash of versions suitable for select lists.
public getVersions ( $queue, $all = false )

mail() public méthode

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).
public mail ( array $opts )
$opts array Option hash with notification information. Possible values: - ticket: (Whups_Ticket) A ticket. If not set, this is assumed to be a reminder message. - recipients: (array|string) The list of recipients, with user names as keys and user roles as values. - subject: (string) The email subject. - view: (Horde_View) The view object for the message text. - template: (string) The template file for the message text. - from: (string) The email sender. - new: (boolean, optional) Whether the passed ticket was just created.

setAttributes() public méthode

Set ticket attributes
public setAttributes ( array $info, Whups_Ticket &$ticket )
$info array Attributes to set
$ticket Whups_Ticket The ticket which attributes to set.

Property Details

$_params protected_oe property

protected array $_params
Résultat array