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.
Methods summary
public
Hermes_Driver_Sql
|
#
__construct( array $params = array() )
Constructor
Parameters
- $params
- A hash containing connection parameters.
db_adapter => The Horde_Db_Adapter object
Returns
Overrides
|
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
|
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
|
public
array
|
#
getHours( array $filters = array(), array $fields = array() )
Fetch time slices
Parameters
Returns
array Array of timeslice objects
|
public
<type>
|
#
markAs( <type> $field, <type> $hours )
Parameters
Returns
<type>
|
public
<type>
|
#
listJobTypes( array $criteria = array() )
Parameters
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
|
|
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
|
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
|
public
|
#
deleteDeliverable( integer $deliverableID )
Parameters
- $deliverableID
- The ID of the deliverable.
Throws
See
|
public
array
|
#
getClientSettings( integer $clientID )
Fetch client settings from storage.
Fetch client settings from storage.
Parameters
Returns
array A hash of client settings.
Throws
|
public
<type>
|
#
updateClientSettings( <type> $clientID, <type> $enterDescription = 1, string $exportID = null )
Parameters
- $clientID
-
- $enterDescription
-
- $exportID
-
Returns
<type>
|
public
<type>
|
|