1 | <?php |
||
8 | class GeoCacheLogService |
||
9 | { |
||
10 | /** |
||
11 | * @var GeoCacheLogRepository |
||
|
|||
12 | */ |
||
13 | private $geoCacheRepository; |
||
14 | |||
15 | /** |
||
16 | * @param GeoCacheLogRepository $geoCacheRepository |
||
17 | */ |
||
18 | public function __construct(GeoCacheLogRepository $geoCacheRepository) |
||
22 | |||
23 | /** |
||
24 | * Fetches all GeoCacheLogs. |
||
25 | * |
||
26 | * @return GeoCacheLogEntity[] |
||
27 | */ |
||
28 | public function fetchAll() |
||
38 | |||
39 | /** |
||
40 | * Fetches the latest geo cache log for given user id. |
||
41 | * |
||
42 | * @param int $userId |
||
43 | * |
||
44 | * @return GeoCacheLogEntity|null |
||
45 | */ |
||
46 | public function getLatestUserLog($userId) |
||
56 | |||
57 | /** |
||
58 | * Creates a GeoCacheLog in the database. |
||
59 | * |
||
60 | * @param GeoCacheLogEntity $entity |
||
61 | * |
||
62 | * @return GeoCacheLogEntity |
||
63 | */ |
||
64 | public function create(GeoCacheLogEntity $entity) |
||
68 | |||
69 | /** |
||
70 | * Update a GeoCacheLog in the database. |
||
71 | * |
||
72 | * @param GeoCacheLogEntity $entity |
||
73 | * |
||
74 | * @return GeoCacheLogEntity |
||
75 | */ |
||
76 | public function update(GeoCacheLogEntity $entity) |
||
80 | |||
81 | /** |
||
82 | * Removes a GeoCacheLog from the database. |
||
83 | * |
||
84 | * @param GeoCacheLogEntity $entity |
||
85 | * |
||
86 | * @return GeoCacheLogEntity |
||
87 | */ |
||
88 | public function remove(GeoCacheLogEntity $entity) |
||
92 | } |
||
93 |