PHP 클래스 Whups_Ticket, horde

Copyright 2004-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.
저자: Chuck Hagenbuch ([email protected])
저자: Jan Schneider ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_changes array Array of changes to make to the ticket.
$_details array The current values of the ticket.
$_id integer The id of the ticket this object wraps.

공개 메소드들

메소드 설명
__construct ( integer $id, array $details ) : Whups_Ticket Constructor.
__toString ( )
addAttachment ( string &$attachment_name, string $attachment_file ) Adds an attachment to this ticket.
addAttributes ( ) : array Adds ticket attribute values to the ticket's details, and returns the list of attributes.
addCommentPerms ( integer $commentId, string $group ) : integer Sets exclusive read permissions on a comment to a certain group.
addMessage ( string $message ) : integer Adds a message to this ticket.
change ( string $detail, string $value ) Tracks that a detail of the ticket should change, but does not actually make the change until commit() is called.
commit ( string $user = null, integer $transaction = null, boolean $notify = true ) Goes through a list of built-up changes and commits them to the backend.
delete ( ) Deletes this ticket.
deleteAttachment ( string $attachment_name ) Removes an attachment from this ticket.
deleteMessage ( integer $message ) Removes a message from this ticket.
feedLink ( ) : array Returns data for this ticket's feed.
get ( string $detail ) : mixed Returns a piece of information from this ticket.
getDetails ( ) : array Returns all ticket information.
getId ( ) : integer Returns the ticket id.
listAllAttachments ( string $filter = null ) : array Returns a list of all files that have been attached to this ticket, whether they still exist or not.
makeTicket ( integer $id ) : Whups_Ticket Returns a ticket object for an id.
newTicket ( array $info, $requester ) : Whups_Ticket Creates a new ticket.
notify ( string $author, boolean $isNew, array $listeners = [] ) Notifies all appropriate people of the creation/update of this ticket.
set ( string $detail, string $value ) Changes a detail of the ticket to a new value.
setDetails ( Horde_Variables $vars, boolean $split_owners = false ) Sets all properties of the ticket necessary to display the TicketDetailsForm.
show ( ) Redirects the browser to this ticket's view.
toString ( ) Returns a plain text representation of a ticket.

보호된 메소드들

메소드 설명
_getVfs ( ) : Horde_Vfs_Base Returns a Horde_Vfs instance.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( integer $id, array $details ) : Whups_Ticket
$id integer The ticket id.
$details array The hash of ticket information.
리턴 Whups_Ticket

__toString() 공개 메소드

public __toString ( )

_getVfs() 보호된 메소드

Returns a Horde_Vfs instance.
protected _getVfs ( ) : Horde_Vfs_Base
리턴 Horde_Vfs_Base A VFS instance.

addAttachment() 공개 메소드

Adds an attachment to this ticket.
public addAttachment ( string &$attachment_name, string $attachment_file )
$attachment_name string The name of the attachment.
$attachment_file string The temporary file containing the data to be stored.

addAttributes() 공개 메소드

Adds ticket attribute values to the ticket's details, and returns the list of attributes.
public addAttributes ( ) : array
리턴 array List of ticket attribute hashes.

addCommentPerms() 공개 정적인 메소드

Sets exclusive read permissions on a comment to a certain group.
public static addCommentPerms ( integer $commentId, string $group ) : integer
$commentId integer The id of the comment to restrict.
$group string The group name to limit access by.
리턴 integer The permission id.

addMessage() 공개 메소드

Adds a message to this ticket.
public addMessage ( string $message ) : integer
$message string The email message content.
리턴 integer The message ID.

change() 공개 메소드

Tracks that a detail of the ticket should change, but does not actually make the change until commit() is called.
또한 보기: commit()
public change ( string $detail, string $value )
$detail string The detail to change.
$value string The new detail value.

commit() 공개 메소드

This will send email updates by default, update the ticket log, etc.
또한 보기: change()
public commit ( string $user = null, integer $transaction = null, boolean $notify = true )
$user string The Horde user of the changes to be made. Defaults to the current user.
$transaction integer The transaction these changes are part of. Defaults to a new transaction.
$notify boolean Send ticket notifications?

delete() 공개 메소드

Deletes this ticket.
public delete ( )

deleteAttachment() 공개 메소드

Removes an attachment from this ticket.
public deleteAttachment ( string $attachment_name )
$attachment_name string The name of the attachment.

deleteMessage() 공개 메소드

Removes a message from this ticket.
public deleteMessage ( integer $message )
$message integer A message ID.

get() 공개 메소드

Returns a piece of information from this ticket.
public get ( string $detail ) : mixed
$detail string The detail to return.
리턴 mixed The detail value.

getDetails() 공개 메소드

Returns all ticket information.
public getDetails ( ) : array
리턴 array The ticket information.

getId() 공개 메소드

Returns the ticket id.
public getId ( ) : integer
리턴 integer The ticket id.

listAllAttachments() 공개 메소드

Returns a list of all files that have been attached to this ticket, whether they still exist or not.
public listAllAttachments ( string $filter = null ) : array
$filter string If set, only return this property of the change commit that included the attachment.
리턴 array The list of file attachments

makeTicket() 공개 정적인 메소드

Returns a ticket object for an id.
public static makeTicket ( integer $id ) : Whups_Ticket
$id integer The ticket id.
리턴 Whups_Ticket Whups_Ticket object

newTicket() 공개 정적인 메소드

Pretty bare wrapper around Whups_Driver::addTicket().
public static newTicket ( array $info, $requester ) : Whups_Ticket
$info array A hash with ticket information.
리턴 Whups_Ticket Whups_Ticket object.

notify() 공개 메소드

Notifies all appropriate people of the creation/update of this ticket.
public notify ( string $author, boolean $isNew, array $listeners = [] )
$author string Who created/changed the ticket?
$isNew boolean Is this a new ticket or a change to an existing one?
$listeners array The list of listener that should receive the notification, with user names as keys and user roles as values. If empty, the list will be created automatically.

set() 공개 메소드

Never touches the backend; do not use for changes that you want to persist.
public set ( string $detail, string $value )
$detail string The detail to change.
$value string The new detail value.

setDetails() 공개 메소드

Sets all properties of the ticket necessary to display the TicketDetailsForm.
public setDetails ( Horde_Variables $vars, boolean $split_owners = false )
$vars Horde_Variables The form variables object to set info in.
$split_owners boolean This has to be set if you want to use the $vars var for saving later or otherwise $form->validate() will fail

show() 공개 메소드

Redirects the browser to this ticket's view.
public show ( )

toString() 공개 메소드

Returns a plain text representation of a ticket.
public toString ( )

프로퍼티 상세

$_changes 보호되어 있는 프로퍼티

Array of changes to make to the ticket.
protected array $_changes
리턴 array

$_details 보호되어 있는 프로퍼티

The current values of the ticket.
protected array $_details
리턴 array

$_id 보호되어 있는 프로퍼티

The id of the ticket this object wraps.
protected int $_id
리턴 integer