ILIAS
trunk Revision v11.0_alpha-1749-g1a06bdef097
|
Public Member Functions | |
__construct (\ilDBInterface $a_db) | |
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) | |
Example 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... | |
Data Fields | |
const | TABLE_NAME = 'geo_location' |
Definition at line 3 of file ilGeoLocationDBRepository.php.
ilGeoLocationDBRepository::__construct | ( | \ilDBInterface | $a_db | ) |
Definition at line 7 of file ilGeoLocationDBRepository.php.
ilGeoLocationDBRepository::createGeoLocation | ( | string | $a_title, |
float | $a_latitude, | ||
float | $a_longitude, | ||
\DateTimeImmutable | $a_expiration_timestamp | ||
) |
Create a new geo location entry.
Implements ilGeoLocationRepository.
Definition at line 12 of file ilGeoLocationDBRepository.php.
References $id.
ilGeoLocationDBRepository::deleteExpiredGeoLocations | ( | ) |
Example for a condition based deletion of multiple geo locations.
Implements ilGeoLocationRepository.
Definition at line 169 of file ilGeoLocationDBRepository.php.
ilGeoLocationDBRepository::deleteGeoLocation | ( | int | $a_id | ) |
Example for deleting single geo location identified by its id.
Implements ilGeoLocationRepository.
Definition at line 148 of file ilGeoLocationDBRepository.php.
ilGeoLocationDBRepository::deleteGeoLocationsByCoordinates | ( | float | $a_latitude, |
float | $a_longitude | ||
) |
Example for a condition based deletion of multiple geo locations.
Implements ilGeoLocationRepository.
Definition at line 158 of file ilGeoLocationDBRepository.php.
ilGeoLocationDBRepository::getGeoLocationById | ( | int | $a_id | ) |
Get a single geo location, identified by its id.
Implements ilGeoLocationRepository.
Definition at line 41 of file ilGeoLocationDBRepository.php.
ilGeoLocationDBRepository::getGeoLocationsByCoordinates | ( | float | $a_latitude, |
float | $a_longitude | ||
) |
Example for reading an array of geo locations which have a given attribute.
Implements ilGeoLocationRepository.
Definition at line 67 of file ilGeoLocationDBRepository.php.
ilGeoLocationDBRepository::ifAnyGeoLocationExistsByCoordinates | ( | float | $a_latitude, |
float | $a_longitude | ||
) |
Example for checking if a geo location (one or more) with a given attribute exists.
Implements ilGeoLocationRepository.
Definition at line 109 of file ilGeoLocationDBRepository.php.
ilGeoLocationDBRepository::ifGeoLocationExistsById | ( | int | $a_id | ) |
Example for checking if geo location with a certain id exists.
Implements ilGeoLocationRepository.
Definition at line 96 of file ilGeoLocationDBRepository.php.
ilGeoLocationDBRepository::updateGeoLocation | ( | ilGeoLocation | $a_obj | ) |
Example for updating all attributes of a given geo location.
Implements ilGeoLocationRepository.
Definition at line 122 of file ilGeoLocationDBRepository.php.
References ilGeoLocation\getExpirationAsTimestamp(), ilGeoLocation\getId(), ilGeoLocation\getLatitude(), ilGeoLocation\getLongitude(), and ilGeoLocation\getTitle().
ilGeoLocationDBRepository::updateGeoLocationTimestampByCoordinates | ( | float | $a_searched_latitude, |
float | $a_searched_longitude, | ||
\DateTimeImmutable | $a_update_timestamp | ||
) |
Example for updating multiple objects at once.
Implements ilGeoLocationRepository.
Definition at line 136 of file ilGeoLocationDBRepository.php.
const ilGeoLocationDBRepository::TABLE_NAME = 'geo_location' |
Definition at line 5 of file ilGeoLocationDBRepository.php.