phpmyadmin/libraries/classes/Plugins/Import/ShapeFileImport.php
William Desportes 4faf964166
Upgrade to shapefile 3
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-02-07 16:45:31 +01:00

40 lines
692 B
PHP

<?php
/**
* This class extends ShapeFile class to cater the following phpMyAdmin
* specific requirements.
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Import;
use PhpMyAdmin\ShapeFile\ShapeFile;
/**
* ShapeFileImport class
*/
class ShapeFileImport extends ShapeFile
{
/**
* Reads given number of bytes from SHP file
*
* @param int $bytes number of bytes
*
* @return string|false
*/
public function readSHP(int $bytes)
{
return ImportShp::readFromBuffer($bytes);
}
/**
* Checks whether file is at EOF
*/
public function eofSHP(): bool
{
global $eof;
return (bool) $eof;
}
}