ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
|
This code is just an example for the Repository Pattern! It is a basic interface to the 'ilGeoLocation*Repository'-classes. More...
Public Member Functions | |
createGeoLocation (string $a_title, float $a_latitude, float $a_longitude, \DateTimeImmutable $a_expiration_timestamp) | |
Create a new geo location entry. More... | |
getGeoLocationById (int $a_id) | |
Get a single geo location, identified by its id. More... | |
getGeoLocationsByCoordinates (float $a_latitude, float $a_longitude) | |
Example for reading an array of geo locations which have a given attribute. More... | |
ifGeoLocationExistsById (int $a_id) | |
Example for checking if geo location with a certain id exists. More... | |
ifAnyGeoLocationExistsByCoordinates (float $a_latitude, float $a_longitude) | |
Example for checking if a geo location (one or more) with a given attribute exists. More... | |
updateGeoLocation (ilGeoLocation $a_obj) | |
Example for updating all attributes of a given geo location. More... | |
updateGeoLocationTimestampByCoordinates (float $a_searched_latitude, float $a_searched_longitude, \DateTimeImmutable $a_update_timestamp) | |
Example for updating multiple objects at once. More... | |
deleteGeoLocation (int $a_id) | |
Exaple for deleting single geo location identified by its id. More... | |
deleteGeoLocationsByCoordinates (float $a_latitude, float $a_longitude) | |
Example for a condition based deletion of multiple geo locations. More... | |
deleteExpiredGeoLocations () | |
Example for a condition based deletion of multiple geo locations. More... | |
This code is just an example for the Repository Pattern! It is a basic interface to the 'ilGeoLocation*Repository'-classes.
Classes, which implement this interface persist/read/update an object of the class ilGeoLocation to/from either a database, a file or something else. Due to this conditions, this interface is as abstract as possible and should not contain any database or filesystem specific methods.
Definition at line 12 of file ilGeoLocationRepository.php.
ilGeoLocationRepository::createGeoLocation | ( | string | $a_title, |
float | $a_latitude, | ||
float | $a_longitude, | ||
\DateTimeImmutable | $a_expiration_timestamp | ||
) |
Create a new geo location entry.
Implemented in ilGeoLocationDBRepository, and ilGeoLocationFileMockRepository.
ilGeoLocationRepository::deleteExpiredGeoLocations | ( | ) |
Example for a condition based deletion of multiple geo locations.
Implemented in ilGeoLocationFileMockRepository, and ilGeoLocationDBRepository.
ilGeoLocationRepository::deleteGeoLocation | ( | int | $a_id | ) |
Exaple for deleting single geo location identified by its id.
Implemented in ilGeoLocationFileMockRepository, and ilGeoLocationDBRepository.
ilGeoLocationRepository::deleteGeoLocationsByCoordinates | ( | float | $a_latitude, |
float | $a_longitude | ||
) |
Example for a condition based deletion of multiple geo locations.
Implemented in ilGeoLocationFileMockRepository, and ilGeoLocationDBRepository.
ilGeoLocationRepository::getGeoLocationById | ( | int | $a_id | ) |
Get a single geo location, identified by its id.
Implemented in ilGeoLocationDBRepository, and ilGeoLocationFileMockRepository.
ilGeoLocationRepository::getGeoLocationsByCoordinates | ( | float | $a_latitude, |
float | $a_longitude | ||
) |
Example for reading an array of geo locations which have a given attribute.
Implemented in ilGeoLocationDBRepository, and ilGeoLocationFileMockRepository.
ilGeoLocationRepository::ifAnyGeoLocationExistsByCoordinates | ( | float | $a_latitude, |
float | $a_longitude | ||
) |
Example for checking if a geo location (one or more) with a given attribute exists.
Implemented in ilGeoLocationDBRepository, and ilGeoLocationFileMockRepository.
ilGeoLocationRepository::ifGeoLocationExistsById | ( | int | $a_id | ) |
Example for checking if geo location with a certain id exists.
Implemented in ilGeoLocationDBRepository, and ilGeoLocationFileMockRepository.
ilGeoLocationRepository::updateGeoLocation | ( | ilGeoLocation | $a_obj | ) |
Example for updating all attributes of a given geo location.
Implemented in ilGeoLocationDBRepository, and ilGeoLocationFileMockRepository.
ilGeoLocationRepository::updateGeoLocationTimestampByCoordinates | ( | float | $a_searched_latitude, |
float | $a_searched_longitude, | ||
\DateTimeImmutable | $a_update_timestamp | ||
) |
Example for updating multiple objects at once.
Implemented in ilGeoLocationFileMockRepository, and ilGeoLocationDBRepository.