\Hermes_Driver

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.

Summary

Methods
Properties
Constants
__construct()
getJobTypeByID()
getDeliverableByID()
updateJobType()
deleteJobType()
listJobTypes()
updateDeliverable()
listDeliverables()
deleteDeliverable()
markAs()
getClientSettings()
updateClientSettings()
purge()
enterTime()
updateTime()
No public properties found
SORT_ORDER_ASC
SORT_ORDER_DESC
No protected methods found
$_params
N/A
No private methods found
No private properties found
N/A

Constants

SORT_ORDER_ASC

SORT_ORDER_ASC

SORT_ORDER_DESC

SORT_ORDER_DESC

Properties

$_params

$_params : array

Parameters

Type

array

Methods

__construct()

__construct(  $params = array()) 

Constructor

Parameters

$params

getJobTypeByID()

getJobTypeByID(integer  $jobTypeID) : array

Retrieve a specific job type record.

Parameters

integer $jobTypeID

The ID of the job type.

Throws

\Horde_Exception_NotFound

Returns

array —

Hash of job type properties.

getDeliverableByID()

getDeliverableByID(integer  $deliverableID) : array

Retrieve a deliverable by ID.

Parameters

integer $deliverableID

The ID of the deliverable to retrieve.

Throws

\Horde_Exception_NotFound

Returns

array —

Hash of deliverable's properties.

updateJobType()

updateJobType(array  $jobtype) : \The

Add or update a job type record.

Parameters

array $jobtype

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.

Returns

\The —

job's ID.

deleteJobType()

deleteJobType(  $jobTypeID) 

Parameters

$jobTypeID

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 —

Hash of job type.

updateDeliverable()

updateDeliverable(array  $deliverable) : integer

Add or update a deliverable.

Parameters

array $deliverable

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.

Returns

integer —

ID of new or saved deliverable.

listDeliverables()

listDeliverables(array  $criteria = array()) : array

Retrieve list of deliverables.

Parameters

array $criteria

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.

Returns

array —

Hash of job types.

deleteDeliverable()

deleteDeliverable(integer  $deliverableID) : void

Delete a deliverable.

Parameters

integer $deliverableID

The ID of the deliverable.

markAs()

markAs(  $field,   $hours) 

Parameters

$field
$hours

getClientSettings()

getClientSettings(  $clientID) 

Parameters

$clientID

updateClientSettings()

updateClientSettings(  $clientID,   $enterDescription = 1,   $exportID = null) 

Parameters

$clientID
$enterDescription
$exportID

purge()

purge() 

enterTime()

enterTime(string  $employee, array  $info) : \Hermes_Slice

Saves a row of time information.

Parameters

string $employee

The Horde ID of the person who worked the hours.

array $info

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

Throws

\Hermes_Exception

Returns

\Hermes_Slice

The new time slice.

updateTime()

updateTime(  $entries) : \Hermes_Slice

Updates time slice information.

Parameters

$entries

Throws

\Horde_Exception_PermissionDenied
\Hermes_Exception

Returns

\Hermes_Slice

The updated time slice.