"file", "action" => [self::class, "set_file"], ]; const NAME = "outyaml"; const DEF = [self::NAME, "outl", "help" => "configurer le fichier en sortie au format YAML", "action" => [self::class, "create_command"], "cmd_args" => [ "usage" => self::NAME." [file]", ["-o", "--param", "args" => "value", "action" => [self::class, "add_params"], "help" => "spécifier une option générique", ], ["args" => [["file"]], "action" => [self::class, "set_file"], ], ], ]; /** @var YamlWriter */ private static $command; static function create_command() { self::$command = new YamlWriter(); } static function set_file($file) { $file = A::last(A::with($file)); self::get()->setOutput($file); } }