PHP Класс 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.
Автор: Robert E. Coyle ([email protected])
Автор: Jan Schneider ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_params array

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
_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.

Описание методов

__construct() публичный Метод

Constructor
public __construct ( array $params ) : Whups_Driver_Base
$params array Parameter array.
Результат Whups_Driver_Base

_json_decode() защищенный Метод

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
Результат mixed The decoded value.

_serializeAttribute() защищенный Метод

Returns a serialized value, if necessary.
protected _serializeAttribute ( $value ) : string
Результат string The JSON encoded value if not already a string.

deleteQueue() публичный Метод

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() публичный Метод

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 filterTicketsByState ( $tickets, $state_category = [] )

formatComments() публичный Метод

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.
Результат string The formatted comment text, if any.

getAllTicketAttributesWithNames() публичный Метод

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
Результат array List of attributes.

getAttributesForType() публичный Метод

Returns the attributes for a ticket type.
public getAttributesForType ( $type = null ) : array
Результат array A list of attributes.

getCategories() публичный Метод

public getCategories ( )

getHistory() публичный Метод

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
Результат array

getQueue() публичный Метод

public getQueue ( $queueId )

getQueues() публичный Метод

public getQueues ( )

getVersion() публичный Метод

public getVersion ( $version )

getVersionInfo() публичный Метод

public getVersionInfo ( $queue )

getVersions() публичный Метод

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

mail() публичный Метод

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() публичный Метод

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

Описание свойств

$_params защищенное свойство

protected array $_params
Результат array