PHP Класс 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.
Наследование: extends Horde_Registry_Api
Показать файл Открыть проект Примеры использования класса

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

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

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

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

..
public getCostObjectInfo ( string $costobject ) : array
$costobject string The costobject id (e.g., "whups:15").
Результат 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 getTableData ( $name, $params ) : string
$name
$params
Результат string

getTableMetaData() публичный статический Метод

public static getTableMetaData ( $name, $params ) :
$name
$params
Результат

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

См. также: Hermes::listClients
public listClients ( )

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

listCostObjects API
public listCostObjects ( array $criteria ) : array
$criteria array The search criteria
Результат array A listCostObjects result array.

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

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.
Результат array Associative array of job types

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

Retrieves a list of available time objects categories.
public listTimeObjectCategories ( ) : array
Результат array An array of all configured time object categories.

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

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

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

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

renderSubtotals() публичный статический Метод

public static renderSubtotals ( &$table_data, $hours, $billable_hours, $value ) :
$table_data
$hours
$billable_hours
$value
Результат