diff --git a/php/src/file/tab/AbstractBuilder.php b/php/src/file/tab/AbstractBuilder.php index 3ec767d..65e301f 100644 --- a/php/src/file/tab/AbstractBuilder.php +++ b/php/src/file/tab/AbstractBuilder.php @@ -118,6 +118,10 @@ abstract class AbstractBuilder extends TempStream implements IBuilder { if ($unsetRows) $this->rows = null; } + function getCount(): int { + return $this->index; + } + abstract protected function _sendContentType(): void; protected bool $sentHeaders = false; diff --git a/php/src/file/tab/IBuilder.php b/php/src/file/tab/IBuilder.php index 9cc794e..536b4a6 100644 --- a/php/src/file/tab/IBuilder.php +++ b/php/src/file/tab/IBuilder.php @@ -8,6 +8,11 @@ interface IBuilder extends \nulib\file\IReader { 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 sendFile(?iterable $rows=null): int;