"appliquer un mapper générique", ], function(string $command): ?array { if (!is_subclass_of($command, Mapper::class)) return null; return [$command, "help" => "appliquer le mapper $command", "action" => [static::class, "create_command"], "cmd_args" => [ "usage" => $command, ["-o", "--param", "args" => "value", "action" => [static::class, "add_params"], "help" => "spécifier une option générique", ], ], ]; }]; } /** @var Mapper */ protected static $command; static function create_command($value, $name, $arg) { self::$command = mappers_command::add(new $arg()); } }