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])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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