blob: 7207ed47589e61b7ce66c6ccafa2bace5090ec38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<?php
class TimeEntryDao extends BaseDao
{
public function addNewTimeEntry($entry)
{
$sqlmap = $this->getConnection();
$sqlmap->insert('AddNewTimeEntry', $entry);
}
public function getTimeEntryByID($entryID)
{
$sqlmap = $this->getConnection();
return $sqlmap->queryForObject('GetTimeEntryByID', $entryID);
}
public function deleteTimeEntry($entryID)
{
$sqlmap = $this->getConnection();
$sqlmap->delete('DeleteTimeEntry', $entryID);
}
public function getTimeEntriesInProject($username, $projectID)
{
$sqlmap = $this->getConnection();
$param['username'] = $username;
$param['project'] = $projectID;
return $sqlmap->queryForList('GetAllTimeEntriesByProjectIdAndUser', $param);
}
public function updateTimeEntry($entry)
{
$sqlmap = $this->getConnection();
$sqlmap->update('UpdateTimeEntry', $entry);
}
}
?>
|