PHP Class Whups_Api, horde

This file defines Whups' external API interface. Other applications can interact with Whups through this API.
Inheritance: extends Horde_Registry_Api
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_links array Links.

Méthodes publiques

Méthode Description
addAttachment ( integer $ticket_id, string $name, string $data ) Adds an attachment to a ticket.
addComment ( integer $ticket_id, string $comment, string $group = null ) : boolean Add a comment to a ticket.
addQueue ( string $name ) : integer Create a new queue.
addTicket ( array $ticket_info ) : integer Create a new ticket.
addVersion ( integer $queue, string $name, string $description, boolean $active = true ) Add a version to a queue
browse ( string $path = '' ) : array Browse through Whups' object tree.
getAssignedTicketIds ( ) : array Return the ids of all open tickets assigned to the current user.
getListTypes ( ) : array Get the types that Whups items can be listed as.
getQueueDetails ( array | integer $queue ) : array Get details for a queue
getRequestedTicketIds ( ) : array Return the ids of all open tickets that the current user created.
getTicketDetails ( integer $queue_id, string $state = null ) : array Get the all tickets for a queue, optionally with a specific state.
getVersionDetails ( integer $version_id ) : array Return the details for a queue version
listAs ( string $type ) : array Get a list of items from whups as type $type.
listCostObjects ( array $criteria ) : array List cost objects
listQueues ( ) : array Return a list of queues that the current user has read permissions for
listSlugs ( ) : array Return a list of slugs that the current user has read permissions for
listTimeObjectCategories ( ) : array List the ways that tickets can be treated as time objects
listTimeObjects ( array $categories, mixed $start, mixed $end ) Lists tickets with due dates as time objects.
listVersions ( integer $queue ) : array List the versions associated with a queue
setTicketAttributes ( $info ) Set attributes for a ticket
updateTicket ( integer $ticket_id, array $ticket_info ) : boolean Update a ticket's properties.

Private Methods

Méthode Description
_sortVersions ( $a, $b )

Method Details

addAttachment() public méthode

Adds an attachment to a ticket.
public addAttachment ( integer $ticket_id, string $name, string $data )
$ticket_id integer The ticket number.
$name string The name of the attachment.
$data string The attachment data.

addComment() public méthode

Add a comment to a ticket.
public addComment ( integer $ticket_id, string $comment, string $group = null ) : boolean
$ticket_id integer The id of the ticket to comment on.
$comment string The comment text to add.
$group string (optional) Restrict this comment to a specific group.
Résultat boolean True

addQueue() public méthode

Create a new queue.
public addQueue ( string $name ) : integer
$name string The queue's name.
Résultat integer The new queue id.

addTicket() public méthode

Create a new ticket.
public addTicket ( array $ticket_info ) : integer
$ticket_info array An array of form variables representing all of the data collected by CreateStep1Form, CreateStep2Form, CreateStep3Form, and optionally CreateStep4Form.
Résultat integer The new ticket id.

addVersion() public méthode

Add a version to a queue
public addVersion ( integer $queue, string $name, string $description, boolean $active = true )
$queue integer The queue id to add the version to.
$name string The name of the new version.
$description string The descriptive text for the new version.
$active boolean Whether the version is still active.

browse() public méthode

Browse through Whups' object tree.
public browse ( string $path = '' ) : array
$path string The level of the tree to browse.
Résultat array The contents of $path

getAssignedTicketIds() public méthode

Return the ids of all open tickets assigned to the current user.
public getAssignedTicketIds ( ) : array
Résultat array Array of ticket ids.

getListTypes() public méthode

Get the types that Whups items can be listed as.
public getListTypes ( ) : array
Résultat array Array of list types.

getQueueDetails() public méthode

Get details for a queue
public getQueueDetails ( array | integer $queue ) : array
$queue array | integer
Résultat array An array of queue information (or an array of arrays, if multiple queues were passed).

getRequestedTicketIds() public méthode

Return the ids of all open tickets that the current user created.
public getRequestedTicketIds ( ) : array
Résultat array Array of ticket ids.

getTicketDetails() public méthode

Get the all tickets for a queue, optionally with a specific state.
public getTicketDetails ( integer $queue_id, string $state = null ) : array
$queue_id integer The queue to get tickets for
$state string The state filter, if any.
Résultat array Array of tickets

getVersionDetails() public méthode

Return the details for a queue version
public getVersionDetails ( integer $version_id ) : array
$version_id integer The version to fetch
Résultat array Array of version details

listAs() public méthode

Get a list of items from whups as type $type.
public listAs ( string $type ) : array
$type string The list type to use (@see getListTypes). Currently supported: 'taskHash'
Résultat array An array of tickets.

listCostObjects() public méthode

List cost objects
public listCostObjects ( array $criteria ) : array
$criteria array The list criteria
Résultat array Tickets (as cost objects) matching $criteria

listQueues() public méthode

Return a list of queues that the current user has read permissions for
public listQueues ( ) : array
Résultat array Array of queue details

listSlugs() public méthode

Return a list of slugs that the current user has read permissions for
public listSlugs ( ) : array
Résultat array Array of queue details

listTimeObjectCategories() public méthode

List the ways that tickets can be treated as time objects
public listTimeObjectCategories ( ) : array
Résultat array Array of time object types

listTimeObjects() public méthode

Lists tickets with due dates as time objects.
public listTimeObjects ( array $categories, mixed $start, mixed $end )
$categories array The time categories (from listTimeObjectCategories) to list.
$start mixed The start date of the period.
$end mixed The end date of the period.

listVersions() public méthode

List the versions associated with a queue
public listVersions ( integer $queue ) : array
$queue integer The queue id to get versions for.
Résultat array Array of queue versions

setTicketAttributes() public méthode

Set attributes for a ticket
public setTicketAttributes ( $info )

updateTicket() public méthode

Update a ticket's properties.
public updateTicket ( integer $ticket_id, array $ticket_info ) : boolean
$ticket_id integer The id of the id to changes.
$ticket_info array The attributes to set, from Whups_Form_Ticket_Edit.
Résultat boolean True

Property Details