/var/www/vhosts/nabawater/common/helpers
Edit: /var/www/vhosts/nabawater/common/helpers/ChunkHelper.php (959B)
*/
class ChunkHelper implements IReadFilter
{
private static $instance;
/**
* @var string
*/
private $startRow = 0;
/**
* @var
*/
private $endRow = 0;
/**
* @return DateTimeHelper
*/
public static function getInstance()
{
return new self();
if (self::$instance === null) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Set the list of rows that we want to read.
*
* @param mixed $startRow
* @param mixed $chunkSize
*/
public function setRows($startRow, $chunkSize)
{
$this->startRow = $startRow;
$this->endRow = $startRow + $chunkSize;
}
public function readCell($column, $row, $worksheetName = '')
{
if (($row == 1) || ($row >= $this->startRow && $row < $this->endRow)) {
return true;
}
return false;
}
}