GeoAdapter.class.php 726 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /*
  3. * (c) Patrick Hayes 2011
  4. *
  5. * This code is open-source and licenced under the Modified BSD License.
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. /**
  10. * GeoAdapter : abstract class which represents an adapter
  11. * for reading and writing to and from Geomtry objects
  12. *
  13. */
  14. abstract class GeoAdapter
  15. {
  16. /**
  17. * Read input and return a Geomtry or GeometryCollection
  18. *
  19. * @return Geometry|GeometryCollection
  20. */
  21. abstract public function read($input);
  22. /**
  23. * Write out a Geomtry or GeometryCollection in the adapter's format
  24. *
  25. * @return mixed
  26. */
  27. abstract public function write(Geometry $geometry);
  28. }