ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilGeoLocationRepository.php
Go to the documentation of this file.
1<?php
2
13
17 public function createGeoLocation(
18 string $a_title,
19 float $a_latitude,
20 float $a_longitude,
21 \DateTimeImmutable $a_expiration_timestamp
22 ) : ilGeoLocation;
23
27 public function getGeoLocationById(int $a_id) : ilGeoLocation;
28
34 public function getGeoLocationsByCoordinates(float $a_latitude, float $a_longitude) : array;
35
39 public function ifGeoLocationExistsById(int $a_id) : bool;
40
44 public function ifAnyGeoLocationExistsByCoordinates(float $a_latitude, float $a_longitude) : bool;
45
49 public function updateGeoLocation(ilGeoLocation $a_obj);
50
54 public function updateGeoLocationTimestampByCoordinates(float $a_searched_latitude, float $a_searched_longitude, \DateTimeImmutable $a_update_timestamp);
55
59 public function deleteGeoLocation(int $a_id);
60
64 public function deleteGeoLocationsByCoordinates(float $a_latitude, float $a_longitude);
65
69 public function deleteExpiredGeoLocations();
70}
An exception for terminatinating execution or to throw for unit testing.
This code is just an example for the Repository Pattern! It is a basic interface to the 'ilGeoLocatio...
ifAnyGeoLocationExistsByCoordinates(float $a_latitude, float $a_longitude)
Example for checking if a geo location (one or more) with a given attribute exists.
updateGeoLocationTimestampByCoordinates(float $a_searched_latitude, float $a_searched_longitude, \DateTimeImmutable $a_update_timestamp)
Example for updating multiple objects at once.
createGeoLocation(string $a_title, float $a_latitude, float $a_longitude, \DateTimeImmutable $a_expiration_timestamp)
Create a new geo location entry.
deleteGeoLocation(int $a_id)
Exaple for deleting single geo location identified by its id.
getGeoLocationsByCoordinates(float $a_latitude, float $a_longitude)
Example for reading an array of geo locations which have a given attribute.
getGeoLocationById(int $a_id)
Get a single geo location, identified by its id.
updateGeoLocation(ilGeoLocation $a_obj)
Example for updating all attributes of a given geo location.
deleteGeoLocationsByCoordinates(float $a_latitude, float $a_longitude)
Example for a condition based deletion of multiple geo locations.
ifGeoLocationExistsById(int $a_id)
Example for checking if geo location with a certain id exists.
deleteExpiredGeoLocations()
Example for a condition based deletion of multiple geo locations.