9 $usage->setDefinitionText(
"Export accounts definition");
11 $filename =
$usage->addRequiredParameter(
"file",
"the output file (use - for stdout)",
function ($values, $argName,
ApiUsage $apiusage)
16 if ($values !==
"-" && is_file($values) && !is_writable($values)) {
17 $apiusage->
exitError(sprintf(
"Error: file output \"%s\" not writable.", $values));
22 $schemaDirectory =
$usage->addOptionalParameter(
"schema-directory",
"directory where produce xsd for documents",
function ($values, $argName,
ApiUsage $apiusage)
27 if ($values !==
"-" && is_dir($values) && !is_writable($values)) {
28 $apiusage->
exitError(sprintf(
"Error: directory output \"%s\" not writable.", $values));
37 $memberOf =
$usage->addOptionalParameter(
"memberOf",
"Restrict to account which are member of this group or role reference",
function ($values, $argName,
ApiUsage $apiusage) use (&
$memberAccount)
45 $apiusage->
exitError(sprintf(
"Error: member reference \"%s\" unknow.", $values));
56 $type =
$usage->addOptionalParameter(
"type",
"restricted to account type",
function ($values, $argName,
ApiUsage $apiusage)
67 $apiusage->
exitError(sprintf(
"Error: wrong value for argument 'type' : %s", $error));
89 if (!is_array(
$type)) {
95 foreach (
$type as $singleType) {
96 switch ($singleType) {
110 $search->setTypeFilter($accountType);
static matchValues($value, $restrictions)
Verify arguments for wsh programs.