10 $this->geo_repository = $a_geo_repository;
15 $geo_locations = $this->geo_repository->getGeoLocationsByCoordinates($latitude, $longitude);
17 if (count($geo_locations) === 0) {
21 $current = array_shift($geo_locations);
23 foreach ($geo_locations as $geo_location) {
24 if ($current->getExpirationAsTimestamp() >= $geo_location->getExpirationAsTimestamp()) {
25 $current = $geo_location;
__construct(ilGeoLocationRepository $a_geo_repository)
calculateTimeTillNextExpiredGeoLocationAt(float $latitude, float $longitude)
This code is just an example for the Repository Pattern! It is a basic interface to the 'ilGeoLocatio...