ShapeFileImport.php 831 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. declare(strict_types=1);
  11. namespace PhpMyAdmin\Plugins\Import;
  12. use PhpMyAdmin\ShapeFile\ShapeFile;
  13. /**
  14. * ShapeFileImport class
  15. *
  16. * @package PhpMyAdmin
  17. */
  18. class ShapeFileImport extends ShapeFile
  19. {
  20. /**
  21. * Reads given number of bytes from SHP file
  22. *
  23. * @param int $bytes number of bytes
  24. *
  25. * @return string|false
  26. */
  27. public function readSHP($bytes)
  28. {
  29. return ImportShp::readFromBuffer($bytes);
  30. }
  31. /**
  32. * Checks whether file is at EOF
  33. *
  34. * @return bool
  35. */
  36. public function eofSHP()
  37. {
  38. global $eof;
  39. return $eof;
  40. }
  41. }