ShapeFileImport.php 805 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * This class extends ShapeFile class to cater the following phpMyAdmin
  5. * specific requirements.
  6. *
  7. * @package PhpMyAdmin-Import
  8. * @subpackage ESRI_Shape
  9. */
  10. namespace PhpMyAdmin\Plugins\Import;
  11. use PhpMyAdmin\ShapeFile\ShapeFile;
  12. /**
  13. * ShapeFileImport class
  14. *
  15. * @package PhpMyAdmin
  16. */
  17. class ShapeFileImport extends ShapeFile
  18. {
  19. /**
  20. * Reads given number of bytes from SHP file
  21. *
  22. * @param int $bytes number of bytes
  23. *
  24. * @return string|false
  25. */
  26. public function readSHP($bytes)
  27. {
  28. return ImportShp::readFromBuffer($bytes);
  29. }
  30. /**
  31. * Checks whether file is at EOF
  32. *
  33. * @return bool
  34. */
  35. public function eofSHP()
  36. {
  37. global $eof;
  38. return $eof;
  39. }
  40. }