34 lines
868 B
PHP
34 lines
868 B
PHP
<?php
|
|
namespace nur\mapper\item;
|
|
|
|
use nur\mapper\base\mappers_command;
|
|
use nur\mapper\base\Tparams_command;
|
|
|
|
/**
|
|
* Class Assoc2SeqMapper_command: classe de support pour construire une instance de
|
|
* mapper pour une application recevant des commandes utilisateurs
|
|
*/
|
|
class Assoc2SeqMapper_command {
|
|
use Tparams_command;
|
|
|
|
const NAME = "assoc2seq";
|
|
const DEF = [self::NAME,
|
|
"help" => "convertir en tableaux séquentiels",
|
|
"action" => [self::class, "create_command"],
|
|
"cmd_args" => [
|
|
"usage" => self::NAME,
|
|
["-o", "--param", "args" => "value",
|
|
"action" => [self::class, "add_params"],
|
|
"help" => "spécifier une option générique",
|
|
],
|
|
],
|
|
];
|
|
|
|
/** @var Assoc2SeqMapper */
|
|
protected static $command;
|
|
|
|
static function create_command() {
|
|
self::$command = mappers_command::add(new Assoc2SeqMapper());
|
|
}
|
|
}
|