Documentation

Hermes_Driver
in package

Hermes_Driver:: defines an API for implementing storage backends for Hermes.

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

Tags
author

Chuck Hagenbuch chuck@horde.org

author

Michael J. Rubinsky mrubinsk@horde.org

Table of Contents

SORT_ORDER_ASC  = 'ASC'
SORT_ORDER_DESC  = 'DESC'
$_params  : array<string|int, mixed>
Parameters
__construct()  : mixed
Constructor
deleteDeliverable()  : void
Delete a deliverable.
deleteJobType()  : mixed
enterTime()  : Hermes_Slice
Saves a row of time information.
getClientSettings()  : mixed
getDeliverableByID()  : array<string|int, mixed>
Retrieve a deliverable by ID.
getJobTypeByID()  : array<string|int, mixed>
Retrieve a specific job type record.
listDeliverables()  : array<string|int, mixed>
Retrieve list of deliverables.
listJobTypes()  : array<string|int, mixed>
Retrieve list of job types.
markAs()  : mixed
purge()  : mixed
updateClientSettings()  : mixed
updateDeliverable()  : int
Add or update a deliverable.
updateJobType()  : The
Add or update a job type record.
updateTime()  : Hermes_Slice
Updates time slice information.

Constants

SORT_ORDER_ASC

public mixed SORT_ORDER_ASC = 'ASC'

SORT_ORDER_DESC

public mixed SORT_ORDER_DESC = 'DESC'

Properties

$_params

Parameters

protected array<string|int, mixed> $_params

Methods

__construct()

Constructor

public __construct([mixed $params = array() ]) : mixed
Parameters
$params : mixed = array()
Return values
mixed

deleteDeliverable()

Delete a deliverable.

public abstract deleteDeliverable(int $deliverableID) : void
Parameters
$deliverableID : int

The ID of the deliverable.

Return values
void

deleteJobType()

public abstract deleteJobType(mixed $jobTypeID) : mixed
Parameters
$jobTypeID : mixed
Tags
TODO
Return values
mixed

enterTime()

Saves a row of time information.

public abstract enterTime(string $employee, array<string|int, mixed> $info) : Hermes_Slice
Parameters
$employee : string

The Horde ID of the person who worked the hours.

$info : array<string|int, mixed>

The billing information to enter. Must contain the following entries:

  • date: The day the hours were worked (ISO format)
  • client: The id of the client the work was done for.
  • type: The type of work done.
  • hours: The number of hours worked
  • billable: (optional) Whether or not the work is billable hours.
  • description: A short description of the work.
  • note: Any notes.
  • costobject: The costobject id
Tags
throws
Hermes_Exception
Return values
Hermes_Slice

The new time slice.

getClientSettings()

public abstract getClientSettings(mixed $clientID) : mixed
Parameters
$clientID : mixed
Tags
TODO
Return values
mixed

getDeliverableByID()

Retrieve a deliverable by ID.

public getDeliverableByID(int $deliverableID) : array<string|int, mixed>
Parameters
$deliverableID : int

The ID of the deliverable to retrieve.

Tags
throws
Horde_Exception_NotFound
Return values
array<string|int, mixed>

Hash of deliverable's properties.

getJobTypeByID()

Retrieve a specific job type record.

public getJobTypeByID(int $jobTypeID) : array<string|int, mixed>
Parameters
$jobTypeID : int

The ID of the job type.

Tags
throws
Horde_Exception_NotFound
Return values
array<string|int, mixed>

Hash of job type properties.

listDeliverables()

Retrieve list of deliverables.

public abstract listDeliverables([array<string|int, mixed> $criteria = array() ]) : array<string|int, mixed>
Parameters
$criteria : array<string|int, mixed> = array()

A hash of search criteria: 'id' => If present, only deliverable with specified ID is searched for. 'client_id' => If present, list is filtered by client ID.

Return values
array<string|int, mixed>

Hash of job types.

listJobTypes()

Retrieve list of job types.

public abstract listJobTypes([array<string|int, mixed> $criteria = array() ]) : array<string|int, mixed>
Parameters
$criteria : array<string|int, mixed> = array()

Hash of filter criteria:

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

Return values
array<string|int, mixed>

Hash of job type.

markAs()

public abstract markAs(mixed $field, mixed $hours) : mixed
Parameters
$field : mixed
$hours : mixed
Tags
TODO:
Return values
mixed

purge()

public abstract purge() : mixed
Tags
TODO
Return values
mixed

updateClientSettings()

public abstract updateClientSettings(mixed $clientID[, mixed $enterDescription = 1 ][, mixed $exportID = null ]) : mixed
Parameters
$clientID : mixed
$enterDescription : mixed = 1
$exportID : mixed = null
Tags
TODO
Return values
mixed

updateDeliverable()

Add or update a deliverable.

public abstract updateDeliverable(array<string|int, mixed> $deliverable) : int
Parameters
$deliverable : array<string|int, mixed>

A hash of deliverable properties: 'id' => The ID of the deliverable, if updating. If not present, a new ID is allocated. 'name' => The deliverable's display name. 'client_id' => The assigned client ID. 'parent' => ID of the deliverables parent deliverable (if a child). 'estimate' => Estimated number of hours for completion of the deliverable. 'active' => Whether this deliverable is active. 'description' => Text description (notes) for this deliverable.

Return values
int

ID of new or saved deliverable.

updateJobType()

Add or update a job type record.

public abstract updateJobType(array<string|int, mixed> $jobtype) : The
Parameters
$jobtype : array<string|int, mixed>

A hash of job type properties: 'id' => The ID of the job, if updating. If not present, a new job type is created. 'name' => The job type's name. 'enabled' => Whether the job type is enabled for new time entry.

Return values
The

job's ID.

updateTime()

Updates time slice information.

public abstract updateTime(mixed $entries) : Hermes_Slice
Parameters
$entries : mixed
Tags
throws
Horde_Exception_PermissionDenied
throws
Hermes_Exception
Return values
Hermes_Slice

The updated time slice.

Search results