Overview

Packages

  • Hermes
  • Horde
    • Data
  • Kronolith
  • None

Classes

  • Hermes
  • Hermes_Ajax_Application
  • Hermes_Api
  • Hermes_Driver
  • Hermes_Driver_Sql
  • Hermes_Factory_Driver
  • Hermes_Form_Admin_AddJobType
  • Hermes_Form_Admin_DeleteJobType
  • Hermes_Form_Admin_EditClientStepOne
  • Hermes_Form_Admin_EditClientStepTwo
  • Hermes_Form_Admin_EditJobTypeStepOne
  • Hermes_Form_Admin_EditJobTypeStepTwo
  • Hermes_Form_Deliverable
  • Hermes_Form_Deliverable_ClientSelector
  • Hermes_Form_Export
  • Hermes_Form_JobType_Edit_Step1
  • Hermes_Form_Search
  • Hermes_Form_Time
  • Hermes_Form_Time_Entry
  • Hermes_LoginTasks_SystemTask_Upgrade
  • Overview
  • Package
  • Class
  • Tree

Class Hermes_Driver_Sql

Hermes SQL storage driver.

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

Hermes_Driver
Extended by Hermes_Driver_Sql
Package: Hermes
Author: Chuck Hagenbuch chuck@horde.org
Author: Michael J. Rubinsky mrubinsk@horde.org
Located at Driver/Sql.php
Methods summary
public Hermes_Driver_Sql
# __construct( array $params = array() )

Constructor

Constructor

Parameters

$params
A hash containing connection parameters. db_adapter => The Horde_Db_Adapter object

Returns

Hermes_Driver_Sql
The driver object.

Overrides

Hermes_Driver::__construct()
public integer
# enterTime( string $employee, array $info )

Save a row of billing information.

Save a row of billing information.

Parameters

$employee
<p>The Horde ID of the person who worked the hours.</p>
$info
<p>The billing information to enter. Must contain the following entries:</p> <pre><span class="php-quote">'date'</span> The day the hours were worked (ISO format) <span class="php-quote">'client'</span> The id of the client the work was done <span class="php-keyword1">for</span>. <span class="php-quote">'type'</span> The type of work done. <span class="php-quote">'hours'</span> The number of hours worked <span class="php-quote">'billable'</span> (optional) Whether <span class="php-keyword1">or</span> not the work is billable hours. <span class="php-quote">'description'</span> A short description of the work. <span class="php-quote">'note'</span> Any notes. <span class="php-quote">'costobject'</span> The costobject id</pre>

Returns

integer
The new timeslice_id of the newly entered slice

Throws

Hermes_Exception
public mixed
# updateTime( array $entries )

Update a set of billing information.

Update a set of billing information.

Parameters

$entries
<p>The billing information to enter. Each array row must contain the following entries: 'id' The id of this time entry. '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 'rate' The hourly rate the work was done at. 'billable' Whether or not the work is billable hours. 'description' A short description of the work.</p> <pre><code> If any rows contain a 'delete' entry, those rows will be deleted instead of updated. </code></pre>

Returns

mixed
boolean

Throws

Horde_Exception_PermissionDenied
Hermes_Exception
public array
# getHours( array $filters = array(), array $fields = array() )

Fetch time slices

Fetch time slices

Parameters

$filters
$fields

Returns

array
Array of timeslice objects
public <type>
# markAs( <type> $field, <type> $hours )

Parameters

$field
$hours

Returns

<type>
public <type>
# listJobTypes( array $criteria = array() )

Parameters

$criteria

Returns

<type>
public The
# updateJobType( array $jobtype )

Add or update a job type record.

Add or update a job type record.

Parameters

$jobtype
<p>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.</p>

Returns

The
job's ID.
public
# deleteJobType( mixed $jobTypeID )
public integer
# updateDeliverable( array $deliverable )

Parameters

$deliverable
<p>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.</p>

Returns

integer
ID of new or saved deliverable.

See

Hermes_Driver::updateDeliverable()
public array
# listDeliverables( array $criteria = array() )

Parameters

$criteria
<p>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.</p>

Returns

array
Hash of job types.

See

Hermes_Driver::listDeliverables()
public
# deleteDeliverable( integer $deliverableID )

Parameters

$deliverableID
The ID of the deliverable.

Throws

Hermes_Exception

See

Hermes_Driver::updateDeliverable()
public array
# getClientSettings( integer $clientID )

Fetch client settings from storage.

Fetch client settings from storage.

Parameters

$clientID
client id

Returns

array
A hash of client settings.

Throws

Hermes_Exception
public <type>
# updateClientSettings( <type> $clientID, <type> $enterDescription = 1, string $exportID = null )

Parameters

$clientID
$enterDescription
$exportID

Returns

<type>
public <type>
# purge( )

Returns

<type>
Methods inherited from Hermes_Driver
getDeliverableByID(), getJobTypeByID()
Constants inherited from Hermes_Driver
SORT_ORDER_ASC, SORT_ORDER_DESC
API documentation generated by ApiGen