"convertir en tableaux associatifs", "action" => [self::class, "create_command"], "cmd_args" => [ "usage" => self::NAME, ["-k", "--parse-keys", "type" => "bool", "action" => [self::class, "set_parse_keys", true], ], ["-o", "--param", "args" => "value", "action" => [self::class, "add_params"], "help" => "spécifier une option générique", ], ["args" => [["value", null]], "type" => "array", "action" => [self::class, "set_keys"], ], ], ]; /** @var Seq2AssocMapper */ protected static $command; static function create_command() { self::$command = mappers_command::add(new Seq2AssocMapper()); } static function set_parse_keys(bool $parseKeys) { self::get()->setParseKeys($parseKeys); } static function set_keys(array $args) { A::merge($keys, ...$args); if ($keys) self::get()->setKeys($keys); } }