ajout getCount()

This commit is contained in:
Jephté Clain 2025-06-19 17:02:56 +04:00
parent 70c82ae504
commit 6bcd8d4cf6
2 changed files with 9 additions and 0 deletions

View File

@ -118,6 +118,10 @@ abstract class AbstractBuilder extends TempStream implements IBuilder {
if ($unsetRows) $this->rows = null; if ($unsetRows) $this->rows = null;
} }
function getCount(): int {
return $this->index;
}
abstract protected function _sendContentType(): void; abstract protected function _sendContentType(): void;
protected bool $sentHeaders = false; protected bool $sentHeaders = false;

View File

@ -8,6 +8,11 @@ interface IBuilder extends \nulib\file\IReader {
function writeAll(?iterable $rows=null): void; function writeAll(?iterable $rows=null): void;
/**
* @return int le nombre de ligne qui ont été écrites (sans compte l'en-tête)
*/
function getCount(): int;
function sendHeaders(): void; function sendHeaders(): void;
function sendFile(?iterable $rows=null): int; function sendFile(?iterable $rows=null): int;