ShapeFileImport.php 702 B

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