"configurer le fichier en sortie au format CSV", "action" => [self::class, "create_command"], "cmd_args" => [ "usage" => self::NAME." [file]", ["-t", "--output-encoding", "args" => "value", "action" => [self::class, "set_output_encoding"], ], ["-f", "--csv-flavour", "args" => "value", "action" => [self::class, "set_csv_flavour"], ], ["-o", "--param", "args" => "value", "action" => [self::class, "add_params"], "help" => "spécifier une option générique", ], ["args" => [["file"]], "action" => [self::class, "set_file"], ], ], ]; const O_OPTION = ["-o", "--output", "args" => "file", "action" => [self::class, "set_file"], ]; const T_OPTION = ["-t", "--output-encoding", "args" => "value", "action" => [self::class, "set_output_encoding"], ]; /** @var CsvWriter */ protected static $command; static function create_command() { self::$command = new CsvWriter(); } static function set_file($file) { $file = A::last(A::with($file)); self::get()->setOutput($file); } static function set_output_encoding(string $output_encoding) { self::get()->setEncodingFilter($output_encoding); } static function set_csv_flavour(string $csv_flavour) { self::get()->setCsvFlavour($csv_flavour); } }