"configurer le fichier en sortie pour écriture ligne par ligne", "action" => [self::class, "create_command"], "cmd_args" => [ "usage" => self::NAME." [file]", ["-t", "--output-encoding", "args" => "value", "action" => [self::class, "set_output_encoding"], ], ["-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 LineWriter */ protected static $command; static function create_command() { self::$command = new LineWriter(); } 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); } }