PHP Class Hermes_Api, horde

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.
Inheritance: extends Horde_Registry_Api
Mostra file Open project: horde/horde Class Usage Examples

Public Methods

Method Description
getCostObjectInfo ( string $costobject ) : array Retrieve information about a costobject's hours. Includes number of hours worked on for each employee, total billed time etc.
getTableData ( $name, $params ) : string
getTableMetaData ( $name, $params ) :
listClients ( )
listCostObjects ( array $criteria ) : array listCostObjects API
listJobTypes ( array $criteria = [] ) : array Retrieve list of job types.
listTimeObjectCategories ( ) : array Retrieves a list of available time objects categories.
listTimeObjects ( array $time_categories, mixed $start, mixed $end ) : array Lists timeslices as timeobjects.
recordTime ( array $data ) : Record a time slice
renderSubtotals ( &$table_data, $hours, $billable_hours, $value ) :

Method Details

getCostObjectInfo() public method

..
public getCostObjectInfo ( string $costobject ) : array
$costobject string The costobject id (e.g., "whups:15").
return 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.

getTableData() public static method

public static getTableData ( $name, $params ) : string
$name
$params
return string

getTableMetaData() public static method

public static getTableMetaData ( $name, $params ) :
$name
$params
return

listClients() public method

See also: Hermes::listClients
public listClients ( )

listCostObjects() public method

listCostObjects API
public listCostObjects ( array $criteria ) : array
$criteria array The search criteria
return array A listCostObjects result array.

listJobTypes() public method

Retrieve list of job types.
public listJobTypes ( array $criteria = [] ) : array
$criteria array Hash of filter criteria: 'enabled' => If present, only retrieve enabled or disabled job types.
return array Associative array of job types

listTimeObjectCategories() public method

Retrieves a list of available time objects categories.
public listTimeObjectCategories ( ) : array
return array An array of all configured time object categories.

listTimeObjects() public method

Lists timeslices as timeobjects.
public listTimeObjects ( array $time_categories, mixed $start, mixed $end ) : array
$time_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.
return array An array of timeObject results.

recordTime() public method

Record a time slice
public recordTime ( array $data ) :
$data array 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]
return

renderSubtotals() public static method

public static renderSubtotals ( &$table_data, $hours, $billable_hours, $value ) :
$table_data
$hours
$billable_hours
$value
return