"configurer le fichier en entrée pour lecture ligne par ligne", "action" => [self::class, "create_command"], "cmd_args" => [ "usage" => self::NAME." [file]", ["-e", "--input-encoding", "args" => "value", "action" => [self::class, "set_input_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 F_OPTION = ["-f", "--input", "args" => "file", "action" => [self::class, "set_file"], ]; const E_OPTION = ["-e", "--input-encoding", "args" => "value", "action" => [self::class, "set_input_encoding"], ]; /** @var LineReader */ protected static $command; static function create_command() { self::$command = new LineReader(); } static function set_file($file) { $file = A::last(A::with($file)); self::get()->setInput($file); } static function set_input_encoding(string $input_encoding) { self::get()->setEncodingFilter($input_encoding); } }