PHP Класс Whups_Api, horde

This file defines Whups' external API interface. Other applications can interact with Whups through this API.
Наследование: extends Horde_Registry_Api
Показать файл Открыть проект

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

Свойство Тип Описание
$_links array Links.

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

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

Приватные методы

Метод Описание
_sortVersions ( $a, $b )

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

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

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

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

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

Create a new queue.
public addQueue ( string $name ) : integer
$name string The queue's name.
Результат integer The new queue id.

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

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.
Результат integer The new ticket id.

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

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

Browse through Whups' object tree.
public browse ( string $path = '' ) : array
$path string The level of the tree to browse.
Результат array The contents of $path

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

Return the ids of all open tickets assigned to the current user.
public getAssignedTicketIds ( ) : array
Результат array Array of ticket ids.

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

Get the types that Whups items can be listed as.
public getListTypes ( ) : array
Результат array Array of list types.

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

Get details for a queue
public getQueueDetails ( array | integer $queue ) : array
$queue array | integer
Результат array An array of queue information (or an array of arrays, if multiple queues were passed).

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

Return the ids of all open tickets that the current user created.
public getRequestedTicketIds ( ) : array
Результат array Array of ticket ids.

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

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

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

Return the details for a queue version
public getVersionDetails ( integer $version_id ) : array
$version_id integer The version to fetch
Результат array Array of version details

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

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'
Результат array An array of tickets.

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

List cost objects
public listCostObjects ( array $criteria ) : array
$criteria array The list criteria
Результат array Tickets (as cost objects) matching $criteria

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

Return a list of queues that the current user has read permissions for
public listQueues ( ) : array
Результат array Array of queue details

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

Return a list of slugs that the current user has read permissions for
public listSlugs ( ) : array
Результат array Array of queue details

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

List the ways that tickets can be treated as time objects
public listTimeObjectCategories ( ) : array
Результат array Array of time object types

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

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

List the versions associated with a queue
public listVersions ( integer $queue ) : array
$queue integer The queue id to get versions for.
Результат array Array of queue versions

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

Set attributes for a ticket
public setTicketAttributes ( $info )

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

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

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