Свойство | Тип | Описание | |
---|---|---|---|
$_db | Horde_Db_Adapter | Handle for the current database connection. |
Метод | Описание | |
---|---|---|
__construct ( array $params = [] ) : Hermes_Driver_Sql | Constructor | |
deleteDeliverable ( $deliverableID ) | ||
deleteJobType ( $jobTypeID ) | ||
enterTime ( string $employee, array $info ) : integer | Save a row of billing information. | |
getClientSettings ( $clientID ) : array | Fetch client settings from storage. | |
getHours ( array $filters = [], array $fields = [] ) : array | Fetch time slices with optional filter. | |
listDeliverables ( $criteria = [], $stats = false ) | ||
listJobTypes ( array $criteria = [] ) : array | Return a list of optionally filtered jobtypes. | |
markAs ( |
||
purge ( ) : |
||
updateClientSettings ( |
||
updateDeliverable ( $deliverable ) | ||
updateJobType ( $jobtype ) | ||
updateTime ( array $entries ) : integer | Update a set of billing information. |
Метод | Описание | |
---|---|---|
_convertFromDriver ( mixed $value ) : mixed | Converts a value from the driver's charset to the default charset. | |
_convertToDriver ( mixed $value ) : mixed | Converts a value from the default charset to the driver's charset. |
Метод | Описание | |
---|---|---|
_equalClause ( $lhs, $rhs, $quote = true ) |
public __construct ( array $params = [] ) : Hermes_Driver_Sql | ||
$params | array | A hash containing connection parameters.
db_adapter => The Horde_Db_Adapter object |
Результат | Hermes_Driver_Sql | The driver object. |
protected _convertFromDriver ( mixed $value ) : mixed | ||
$value | mixed | A value to convert. |
Результат | mixed | The converted value. |
protected _convertToDriver ( mixed $value ) : mixed | ||
$value | mixed | A value to convert. |
Результат | mixed | The converted value. |
public enterTime ( string $employee, array $info ) : integer | ||
$employee | string | The Horde ID of the person who worked the hours. |
$info | array | 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 |
Результат | integer | The new timeslice_id of the newly entered slice |
public getClientSettings ( $clientID ) : array | ||
Результат | array | A hash of client settings. |
public getHours ( array $filters = [], array $fields = [] ) : array | ||
$filters | array | An array of properties to filter on. Each entry is a field => value format. Possible field values: client, jobtype, submitted, exported, billable, start, end, employee, id, costobject. |
$fields | array | |
Результат | array | Array of timeslice objects |
public listJobTypes ( array $criteria = [] ) : array | ||
$criteria | array | An array of optional criteria. Can include: - id: (string) The jobtype id. - enabled: (boolean) The enabled property of the jobtype. |
Результат | array | An array of jobtype hashes. Each hash contains the following keys: - id: The jobtype id. - name: The name. - rate: The hourly rate. - billable: The billable flag. - enabled: The enabled flag. |
public updateClientSettings ( |
||
$clientID | ||
$enterDescription | ||
$exportID | string | |
Результат |
public updateTime ( array $entries ) : integer | ||
$entries | array | 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. 'employee' The employee If any rows contain a 'delete' entry, those rows will be deleted instead of updated. |
Результат | integer | The number of successful updates. |