Methods summary
	
		| 
			 public 
			
			
			 |  | 
	
		| 
			 public 
			integer
			
			 | 
		#
		addQueue( mixed $name, mixed $description, mixed $slug = '', mixed $email = '' )
			Adds a new queue. Returns
					integerThe new queue ID.
 ThrowsParams
						string $name         A queue name.
string $description  A queue description.
 string $slug         A queue slug.
 string $email        A queue email address.
 
 | 
	
		| 
			 public 
			integer
			
			 | 
		#
		addType( string $name, string $description )
			Adds a new ticket type. Parameters
					$nameA type name.
$descriptionA type description.
Returns
					integerThe new type ID.
 Throws | 
	
		| 
			 public 
			integer
			
			 | 
		#
		addState( integer $typeId, string $name, string $description, string $category )
			Adds a new state to a ticket type. 
			Adds a new state to a ticket type. Parameters
					$typeIdA ticket type ID.
$nameA state name
$descriptionA state description.
$categoryA state category.
Returns
					integerThe new state ID.
 Throws | 
	
		| 
			 public 
			integer
			
			 | 
		#
		addPriority( integer $typeId, string $name, string $description )
			Adds a new priority to a ticket type. 
			Adds a new priority to a ticket type. Parameters
					$typeIdA ticket type ID.
$nameA priority name.
$descriptionA priority description.
Returns
					integerThe new priority ID.
 Throws | 
	
		| 
			 public 
			integer
			
			 | 
		#
		addVersion( integer $queueId, string $name, string $description, boolean $active )
			Adds a new version to a queue. 
			Adds a new version to a queue. Parameters
					$queueIdA queue ID.
$nameA version name.
$descriptionA version description.
$activeWhether the version is active.
Returns
					integerThe new version ID.
 Throws | 
	
		| 
			 public 
			integer
			
			 | 
		#
		addReply( integer $type, string $name, string $text )
			Adds a form reply. Parameters
					$typeA ticket type ID.
$nameA reply name.
$textA reply text.
Returns
					integerThe new form reply ID.
 Throws | 
	
		| 
			 public 
			integer
			
			 | 
		#
		addTicket( array & $info, string $requester )
			Adds a ticket. Parameters
					$info<p>A ticket info hash. Will get a
                          'last-transaction' value added.</p>
$requesterA ticket requester.
Returns
					integerThe new ticket ID.
 Throws | 
	
	
		| 
			 public 
			
			
			 | 
		#
		updateTicket( integer $ticketId, array $attributes )
			Updates a ticket. Does not update the ticket log (so that it can be used for things
low-level enough to not show up there. In general, you should always
update the log; Whups_Ticket::commit() will take care of this in most
cases). Parameters
					$ticketIdA ticket ID.
$attributesAn attribute hash.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		addTicketOwner( integer $ticketId, string $owner )
			Adds a ticket owner. Parameters
					$ticketIdA ticket ID.
$ownerAn owner ID.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteTicketOwner( integer $ticketId, string $owner )
			Removes a ticket owner. Parameters
					$ticketIdA ticket ID.
$ownerAn owner ID.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteTicket( integer $id )
			Removes a ticket. ParametersThrows | 
	
		| 
			 public 
			array
			
			 | 
		#
		executeQuery( Whups_Query$query, Horde_Variables $vars, boolean $get_details = true, boolean $munge = true )
			Executes a query. Parameters
					$queryA query object.
$varsRequest variables.
$get_detailsWhether to return all ticket details.
$munge@TODO (?)
Returns
					arrayList of ticket IDs or ticket details that match the query
               criteria. Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		clauseFromQuery( mixed $args, mixed $type, mixed $criterion, mixed $cvalue, mixed $operator, mixed $value )
			
		 
			
		 | 
	
		| 
			 public 
			array
			
			 | 
		#
		getTicketsByProperties( array $info, boolean $munge = true, boolean $perowner = false )
			Returns tickets by searching for its properties. 
			Returns tickets by searching for its properties. Parameters
					$infoAn array of properties to search for.
$mungeMunge the query (?)
$perownerGroup the results per owner?
Returns
					arrayAn array of ticket information hashes.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getTicketDetails( integer $ticket, boolean $checkPerms = true )
			Returns ticket details. Parameters
					$ticketA ticket ID.
$checkPermsEnforce permissions?
Returns
					arrayA ticket information hash.
 Throws
					Horde_Exception_NotFoundHorde_Exception_PermissionDenied
 | 
	
		| 
			 public 
			integer
			
			 | 
		#
		getTicketState( integer $ticket_id )
			Returns a ticket state. ParametersReturns
					integerA state ID.
 Throws | 
	
		| 
			 public 
			string
			
			 | 
		#
		getGuestEmail( string $guest_id )
			Returns a guest's email address. 
			Returns a guest's email address. ParametersReturns
					stringThe guest's email address.
 Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteHistory( integer $transaction )
			Deletes all changes of a transaction. 
			Deletes all changes of a transaction. Parameters
					$transactionA transaction ID.
Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getQueueSummary( array $queue_ids )
			Return a list of queues and the number of open tickets in each. 
			Return a list of queues and the number of open tickets in each. Parameters
					$queue_ids$queues  Array of queue IDs to summarize.
Returns
					arrayA list of queue hashes.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getQueueInternal( integer $queueId )
			Returns a queue information hash. 
			Returns a queue information hash. ParametersReturns
					arrayA queue hash.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getQueueBySlugInternal( string $slug )
			Returns a queue information hash. 
			Returns a queue information hash. ParametersReturns
					arrayA queue hash.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getQueuesInternal( )
			Returns a list of available queues. 
			Returns a list of available queues. Returns
					arrayAn hash of queue ID => queue name.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getSlugs( )
			Returns a list of all available slugs. 
			Returns a list of all available slugs. Returns
					arrayA hash of queue ID => queue slug.
 Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		updateQueue( integer $queueId, string $name, string $description, array $types = array(), integer $versioned = 0, string $slug = '', string $email = '', integer $default = null )
			Updates a queue. Parameters
					$queueIdA queue ID.
$nameA queue name.
$descriptionA queue description.
$typesA list of type IDs for this queue.
$versioned<p>Is this queue versioned? (1 = true,
                            0 = false)</p>
$slugA queue slug.
$emailA queue email address.
$defaultThe default ticket type.
Throws | 
	
		| 
			 public 
			integer
			
			 | 
		#
		getDefaultType( integer $queue )
			Returns a queue's default ticket type. 
			Returns a queue's default ticket type. ParametersReturns
					integerA ticket type ID.
 | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteQueue( integer $queueId )
			Deletes an entire queue, and all references to it. 
			Deletes an entire queue, and all references to it. ParametersThrowsOverrides | 
	
		| 
			 public 
			
			
			 | 
		#
		updateTypesQueues( array $tmPairs )
			Update type-queue-associations. 
			Update type-queue-associations. Parameters
					$tmPairsarray of mappings.
Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getQueueUsers( integer $queueId )
			Returns a list of responsible users. 
			Returns a list of responsible users. ParametersReturns
					arrayAn array of users responsible for the queue.
 Throws
					Whups_Execption
				 | 
	
		| 
			 public 
			
			
			 | 
		#
		addQueueUser( integer $queueId, string $userId )
			Adds a responsible user. Parameters
					$queueIdA queue ID.
$userIdA user ID.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		removeQueueUser( integer $queueId, string $userId )
			Removes a responsible user. 
			Removes a responsible user. Parameters
					$queueIdA queue ID.
$userIdA user ID.
Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getType( integer $typeId )
			Returns a ticket type. Parameters
					$typeIdA ticket type ID.
Returns
					arrayThe ticket type information.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getTypes( integer $queueId )
			Returns a list of ticket types associated with a queue. 
			Returns a list of ticket types associated with a queue. ParametersReturns
					arrayA hash of type ID => type name.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getTypeIds( integer $queueId )
			Returns a list of ticket type IDs associated with a queue. 
			Returns a list of ticket type IDs associated with a queue. ParametersReturns
					arrayA list of type IDs.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getAllTypes( )
			Returns a list of all available ticket types. 
			Returns a list of all available ticket types. Returns
					arrayA hash of type ID => type name.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getAllTypeInfo( )
			Returns a list of all available ticket types. 
			Returns a list of all available ticket types. Returns
					arrayA list of ticket type information hashes.
 Throws | 
	
		| 
			 public 
			string
			
			 | 
		#
		getTypeName( integer $type )
			Returns a ticket type name. 
			Returns a ticket type name. ParametersReturns
					stringThe ticket type's name.
 Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		updateType( integer $typeId, string $name, string $description )
			Updates a ticket type. Parameters
					$typeIdA ticket type ID.
$nameA ticket type name.
$descriptionA ticket type description.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteType( integer $typeId )
			Deletes a ticket type. ParametersThrows | 
	
		| 
			 public 
			array
			
			 | 
		#
		getStates( integer $type = null, string|array $category = '', string|array $notcategory = '' )
			Returns available states for a ticket type and state category. 
			Returns available states for a ticket type and state category. Parameters
					$typeA ticket type ID.
$categoryState categories to include.
$notcategoryState categories to not include.
Returns
					arrayA hash of state ID => state name.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getState( integer $stateId )
			Returns a state information hash. 
			Returns a state information hash. ParametersReturns
					arrayA state definition hash.
 | 
	
		| 
			 public 
			array
			
			 | 
		#
		getAllStateInfo( integer $type )
			Returns all state information hashes for a ticket type. 
			Returns all state information hashes for a ticket type. ParametersReturns
					arrayA list of state hashes.
 Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		updateState( integer $stateId, string $name, string $description, string $category )
			Updates a state. Parameters
					$stateIdA state ID.
$nameA state name.
$descriptionA state description.
$categoryA state category.
Throws | 
	
		| 
			 public 
			integer
			
			 | 
		#
		getDefaultState( integer $type )
			Returns the default state for a ticket type. 
			Returns the default state for a ticket type. ParametersReturns
					integerThe default state ID for the specified type.
 Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		setDefaultState( integer $type, integer $state )
			Sets the default state for a ticket type. 
			Sets the default state for a ticket type. Parameters
					$typeA type ID.
$stateA state ID.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteState( integer $state_id )
			Deletes a state. ParametersThrows | 
	
		| 
			 public 
			array
			
			 | 
		#
		getQuery( integer $queryId )
			Returns query details. ParametersReturns
					arrayQuery information.
 Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		saveQuery( Whups_Query$query )
			Saves query details. If the query doesn't exist yes, it is added, update otherwise. ParametersThrows | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteQuery( integer $queryId )
			Deletes a query. ParametersThrows | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		isCategory( string $category, integer $state_id )
			Returns whether a state is of a certain category. 
			Returns whether a state is of a certain category. Parameters
					$categoryA state category.
$state_idA state ID.
Returns
					booleanTrue if the state is of the given category.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getAllPriorityInfo( integer $type )
			Returns all priority information hashes for a ticket type. 
			Returns all priority information hashes for a ticket type. ParametersReturns
					arrayA list of priority hashes.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getPriorities( integer $type = null )
			Returns a list of priorities. 
			Returns a list of priorities. If the priorities are not limited to a ticket type, the priority names
are suffixed with associated ticket type names. Parameters
					$typeLimit result to this ticket type's priorities.
Returns
					arrayA hash of priority ID => priority name.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getPriority( integer $priorityId )
			Returns a priority information hash. 
			Returns a priority information hash. ParametersReturns
					arrayA priority definition hash.
 Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		updatePriority( integer $priorityId, string $name, string $description )
			Updates a priority. Parameters
					$priorityIdA priority ID.
$nameA priority name.
$descriptionA priority description.
Throws | 
	
		| 
			 public 
			integer
			
			 | 
		#
		getDefaultPriority( integer $type )
			Returns the default priority for a ticket type. 
			Returns the default priority for a ticket type. ParametersReturns
					integerThe default priority ID for the specified type.
 Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		setDefaultPriority( integer $type, integer $priority )
			Sets the default priority for a ticket type. 
			Sets the default priority for a ticket type. Parameters
					$typeA type ID.
$priorityA priority ID.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		deletePriority( integer $priorityId )
			Deletes a priority. Parameters
					$priorityIdA priority ID.
Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getVersionInfoInternal( integer $queue )
			Returns all versions of a queue. 
			Returns all versions of a queue. ParametersReturns
					arrayA list of version information hashes.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getVersionInternal( integer $versionId )
			Returns a version information hash. 
			Returns a version information hash. ParametersReturns
					arrayA version definition hash.
 Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		updateVersion( integer $versionId, string $name, string $description, boolean $active )
			Updates a version. Parameters
					$versionIdA version ID.
$nameA version name.
$descriptionA version description.
$activeWhether the version is still active.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteVersion( integer $versionId )
			Deletes a version. ParametersThrows | 
	
		| 
			 public 
			array
			
			 | 
		#
		getReplies( integer $type )
			Returns all available form replies for a ticket type. 
			Returns all available form replies for a ticket type. ParametersReturns
					arrayA hash of reply ID => reply information hash.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getReply( integer $reply_id )
			Returns a form reply. Parameters
					$reply_idA form reply ID.
Returns
					arrayA hash with all form reply information.
 Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		updateReply( integer $reply, string $name, string $text )
			Updates a form reply. Parameters
					$replyA reply ID.
$nameA reply name.
$textA reply text.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteReply( integer $reply )
			Deletes a form reply. ParametersThrowsOverrides | 
	
		| 
			 public 
			
			
			 | 
		#
		addListener( integer $ticket, string $user )
			Adds a ticket listener. Parameters
					$ticketA ticket ID.
$userAn email address.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteListener( integer $ticket, string $user )
			Deletes a ticket listener. 
			Deletes a ticket listener. Parameters
					$ticketA ticket ID.
$userAn email address.
Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getListeners( integer $ticket, boolean $withowners = true, boolean $withrequester = true, boolean $withresponsible = false )
			Returns all ticket listeners. 
			Returns all ticket listeners. Parameters
					$ticketA ticket ID.
$withownersInclude ticket owners?
$withrequesterInclude ticket creators?
$withresponsible<p>Include users responsible for the ticket
                                 queue?</p>
Returns
					arrayA list of all ticket listeners.
 Throws | 
	
		| 
			 public 
			integer
			
			 | 
		#
		addAttributeDesc( integer $type_id, string $name, string $desc, string $type, array $params, boolean $required )
			Adds an attribute to a ticket type. 
			Adds an attribute to a ticket type. Parameters
					$type_idA ticket type ID.
$nameAn attribute name.
$descAn attribute description.
$typeA form field type.
$paramsAdditional parameters for the field type.
$requiredWhether the attribute is mandatory.
Returns
					integerThe new attribute ID.
 Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		updateAttributeDesc( integer $attribute_id, string $newname, string $newdesc, string $newtype, array $newparams, boolean $newrequired )
			Updates an attribute for a ticket type. 
			Updates an attribute for a ticket type. Parameters
					$attribute_idAn attribute ID.
$newnameAn attribute name.
$newdescAn attribute description.
$newtypeA form field type.
$newparamsAdditional parameters for the field type.
$newrequiredWhether the attribute is mandatory.
Throws | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteAttributeDesc( integer $attribute_id )
			Deletes an attribute for a ticket type. 
			Deletes an attribute for a ticket type. Parameters
					$attribute_idAn attribute ID.
Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getAllAttributes( )
			Returns all attributes. Returns
					arrayA list of attributes hashes.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getAttributeDesc( integer $attribute_id )
			Returns an attribute information hash. 
			Returns an attribute information hash. Parameters
					$attribute_idAn attribute ID.
Returns
					arrayThe attribute hash.
 Throws | 
	
		| 
			 public 
			string
			
			 | 
		#
		getAttributeName( integer $attribute_id )
			Returns an attribute name. 
			Returns an attribute name. Parameters
					$attribute_idAn attribute ID.
Returns
					stringThe attribute name.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getAttributeNamesForType( integer $type_id )
			Returns available attribute names for a ticket type. 
			Returns available attribute names for a ticket type. Parameters
					$type_idA ticket type ID.
Returns
					arrayA list of attribute names.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getAttributeInfoForType( integer $type_id )
			Returns available attributes for a ticket type. 
			Returns available attributes for a ticket type. Parameters
					$type_idA ticket type ID.
Returns
					arrayA list of attribute information hashes.
 Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getTicketAttributes( integer|array $ticket_id )
			Returns the attribute values of a ticket. 
			Returns the attribute values of a ticket. Parameters
					$ticket_idOne or more ticket IDs.
Returns
					arrayIf requesting a single ticket, an attribute ID =>
               attribute value hash. If requesting multiple tickets, a
               list of hashes with ticket ID, attribute ID and attribute
               value. Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getTicketAttributesWithNames( integer|array $ticket_id )
			Returns the attribute values and names of a ticket. 
			Returns the attribute values and names of a ticket. Parameters
					$ticket_idOne or more ticket IDs.
Returns
					arrayIf requesting a single ticket, an attribute name =>
               attribute value hash. If requesting multiple tickets, a
               list of hashes with ticket ID, attribute ID, attribute
               name, and attribute value. Throws | 
	
		| 
			 public 
			array
			
			 | 
		#
		getOwners( mixed $ticketId )
			Returns the owners of a ticket. 
			Returns the owners of a ticket. Parameters
					$ticketId$ticketId  One or more ticket IDs.
Returns
					arrayAn hash of ticket ID => owner IDs
 Throws | 
	
		| 
			 public 
			integer
			
			 | 
		#
		updateLog( integer $ticket_id, string $user, array $changes = array(), integer $transactionId = null )
			Adds a new log entry Parameters
					$ticket_idA ticket ID.
$userA user updating the ticket.
$changesA list of changes.
$transactionIdA transaction ID to use.
Returns
					integerA transaction ID.
 Throws | 
	
		| 
			 public 
			integer
			
			 | 
		#
		newTransaction( string $creator, string $creator_email = null )
			Create a new transaction ID. 
			Create a new transaction ID. Parameters
					$creatorA transaction creator.
$creator_emailThe transaction creator's email address.
Returns
					integerA transaction ID.
 Throws |