\Hermes_Api

Hermes external API interface.

This file defines Hermes's external API interface. Other applications can interact with Hermes through this API.

See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://www.horde.org/licenses/bsdl.php.

Summary

Methods
Properties
Constants
getTableMetaData()
getTableData()
renderSubtotals()
listCostObjects()
listJobTypes()
listClients()
recordTime()
getCostObjectInfo()
listTimeObjectCategories()
listTimeObjects()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getTableMetaData()

getTableMetaData(\<type>  $name, \<type>  $params) : \<type>

Parameters

\ $name
\ $params

Returns

\

getTableData()

getTableData(\<type>  $name, \<type>  $params) : string

Parameters

\ $name
\ $params

Returns

string

renderSubtotals()

renderSubtotals(\<type>  $table_data, \<type>  $hours, \<type>  $billable_hours, \<type>  $value) : \<type>

Parameters

\ $table_data
\ $hours
\ $billable_hours
\ $value

Returns

\

listCostObjects()

listCostObjects(array  $criteria) : array

listCostObjects API

Parameters

array $criteria

The search criteria

Returns

array —

A listCostObjects result array.

listJobTypes()

listJobTypes(array  $criteria = array()) : array

Retrieve list of job types.

Parameters

array $criteria

Hash of filter criteria:

                 'enabled' => If present, only retrieve enabled
                              or disabled job types.

Returns

array —

Associative array of job types

listClients()

listClients() 

recordTime()

recordTime(array  $data) : \<type>

Record a time slice

Parameters

array $data

Slice attributes

 date          - The slice date (required).
 client        - The client id (required).
 type          - The jobType id (required).
 costobject    - The costObject id [none]
 hours         - Number of hours (required).
 billable      - Time billable? [true]
 description   - Description (required)
 note          - Note [blank]

Returns

\

getCostObjectInfo()

getCostObjectInfo(string  $costobject) : array

Retrieve information about a costobject's hours. Includes number of hours worked on for each employee, total billed time etc.

..

Parameters

string $costobject

The costobject id (e.g., "whups:15").

Returns

array —

An array of data with the following structure: employees - an array of employee ids as keys, number of hours as values. total - total number of hours billable - total number of billable hours.

listTimeObjectCategories()

listTimeObjectCategories() : array

Retrieves a list of available time objects categories.

Returns

array —

An array of all configured time object categories.

listTimeObjects()

listTimeObjects(array  $time_categories, mixed  $start, mixed  $end) : array

Lists timeslices as timeobjects.

Parameters

array $time_categories

The time categories (from listTimeObjectCategories) to list.

mixed $start

The start date of the period.

mixed $end

The end date of the period.

Throws

\Hermes_Exception

Returns

array —

An array of timeObject results.