1 | <?php |
||
10 | class GeoCacheService |
||
11 | { |
||
12 | /** |
||
13 | * @var GeoCacheRepository |
||
14 | */ |
||
15 | private $geoCacheRepository; |
||
16 | |||
17 | /** |
||
18 | * @param GeoCacheRepository $geoCacheRepository |
||
19 | */ |
||
20 | public function __construct(GeoCacheRepository $geoCacheRepository) |
||
24 | |||
25 | /** |
||
26 | * Fetches all GeoCaches. |
||
27 | * |
||
28 | * @return GeoCacheEntity[] |
||
29 | */ |
||
30 | public function fetchAll() |
||
40 | |||
41 | /** |
||
42 | * Fetch a waypoint by given type. |
||
43 | * |
||
44 | * @param string $waypoint |
||
45 | * |
||
46 | * @return GeoCacheEntity|null |
||
47 | */ |
||
48 | public function fetchByWaypoint($waypoint) |
||
70 | |||
71 | /** |
||
72 | * Creates a GeoCache in the database. |
||
73 | * |
||
74 | * @param GeoCacheEntity $entity |
||
75 | * |
||
76 | * @return GeoCacheEntity |
||
77 | */ |
||
78 | public function create(GeoCacheEntity $entity) |
||
82 | |||
83 | /** |
||
84 | * Update a GeoCache in the database. |
||
85 | * |
||
86 | * @param GeoCacheEntity $entity |
||
87 | * |
||
88 | * @return GeoCacheEntity |
||
89 | */ |
||
90 | public function update(GeoCacheEntity $entity) |
||
94 | |||
95 | /** |
||
96 | * Removes a GeoCache from the database. |
||
97 | * |
||
98 | * @param GeoCacheEntity $entity |
||
99 | * |
||
100 | * @return GeoCacheEntity |
||
101 | */ |
||
102 | public function remove(GeoCacheEntity $entity) |
||
106 | } |
||
107 |