Locatable.php 831 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Define an interface for geo-tagging entities.
  4. *
  5. * @package Elgg.Core
  6. * @subpackage SocialModel.Locatable
  7. */
  8. interface Locatable {
  9. /**
  10. * Set a location text
  11. *
  12. * @param string $location Textual representation of location
  13. *
  14. * @return void
  15. */
  16. public function setLocation($location);
  17. /**
  18. * Set latitude and longitude tags for a given entity.
  19. *
  20. * @param float $lat Latitude
  21. * @param float $long Longitude
  22. *
  23. * @return void
  24. */
  25. public function setLatLong($lat, $long);
  26. /**
  27. * Get the contents of the ->geo:lat field.
  28. *
  29. * @return int
  30. */
  31. public function getLatitude();
  32. /**
  33. * Get the contents of the ->geo:lat field.
  34. *
  35. * @return int
  36. */
  37. public function getLongitude();
  38. /**
  39. * Get the ->location metadata.
  40. *
  41. * @return string
  42. */
  43. public function getLocation();
  44. }