nur-sery/src/output/TtyOutput.php

18 lines
319 B
PHP
Raw Normal View History

2023-11-09 10:03:35 +04:00
<?php
namespace nur\sery\output;
2023-11-09 10:34:36 +04:00
use nulib\str;
2023-11-09 10:03:35 +04:00
class TtyOutput extends Output {
use TOutputObjectAsCsv;
2023-11-09 10:34:36 +04:00
function print(?array $contents): void {
echo str::join("", $contents);
2023-11-09 10:03:35 +04:00
}
function printCsv(?array $row): void {
#XXX rendre paramétrable les options de sortie
fputcsv(STDOUT, $row);
}
}