1 | <?php |
||
9 | class GeoCacheService |
||
10 | { |
||
11 | /** |
||
12 | * @var GeoCacheRepository |
||
|
|||
13 | */ |
||
14 | private $geoCacheRepository; |
||
15 | |||
16 | /** |
||
17 | * @param GeoCacheRepository $geoCacheRepository |
||
18 | */ |
||
19 | public function __construct(GeoCacheRepository $geoCacheRepository) |
||
23 | |||
24 | /** |
||
25 | * Fetches all GeoCaches. |
||
26 | * |
||
27 | * @return GeoCacheEntity[] |
||
28 | */ |
||
29 | public function fetchAll() |
||
39 | |||
40 | /** |
||
41 | * Fetch a waypoint by given type. |
||
42 | * |
||
43 | * @param string $waypoint |
||
44 | * |
||
45 | * @return GeoCacheEntity|null |
||
46 | */ |
||
47 | public function fetchByWaypoint($waypoint) |
||
67 | |||
68 | /** |
||
69 | * Creates a GeoCache in the database. |
||
70 | * |
||
71 | * @param GeoCacheEntity $entity |
||
72 | * |
||
73 | * @return GeoCacheEntity |
||
74 | */ |
||
75 | public function create(GeoCacheEntity $entity) |
||
79 | |||
80 | /** |
||
81 | * Update a GeoCache in the database. |
||
82 | * |
||
83 | * @param GeoCacheEntity $entity |
||
84 | * |
||
85 | * @return GeoCacheEntity |
||
86 | */ |
||
87 | public function update(GeoCacheEntity $entity) |
||
91 | |||
92 | /** |
||
93 | * Removes a GeoCache from the database. |
||
94 | * |
||
95 | * @param GeoCacheEntity $entity |
||
96 | * |
||
97 | * @return GeoCacheEntity |
||
98 | */ |
||
99 | public function remove(GeoCacheEntity $entity) |
||
103 | } |
||
104 |