in src/GeneratorCLI.hack [34:125]
protected function getSupportedOptions(): vec<CLIOptions\CLIOption> {
return vec[
CLIOptions\flag(
() ==> {
$this->hidePrivateMethods = true;
$this->hidePrivateNamespaces = true;
},
'A hybrid flag for --hide-private-namespaces and --hide-private-methods',
'--hide-all-private'
),
CLIOptions\flag(
() ==> {
$this->hidePrivateNamespaces = true;
},
'Entities from _Private and __Private namespaces',
'--hide-private-namespaces'
),
CLIOptions\flag(
() ==> {
$this->hidePrivateMethods = true;
},
'Hide all methods with the `private` accessability',
'--hide-private-methods'
),
CLIOptions\flag(
() ==> {
$this->hideInheritedMethods = true;
},
'Hide all methods that are inherited; only show methods directly defined',
'--hide-inherited-methods',
),
CLIOptions\flag(
() ==> { $this->verbosity++; },
'Increase output verbosity',
'--verbose',
'-v',
),
CLIOptions\with_required_enum(
OutputFormat::class,
$f ==> { $this->format = $f; },
Str\format(
'Desired output format (%s). Default: %s',
Str\join(OutputFormat::getValues(), '|'),
(string) $this->format,
),
'--format',
'-f',
),
CLIOptions\with_required_string(
$s ==> { $this->outputRoot = $s; },
'Directory for output files. Default: working directory',
'--output',
'-o',
),
CLIOptions\flag(
() ==> {
$this->syntaxHighlightingOn = false;
},
'Generate documentation without syntax highlighting',
'--no-highlighting',
'-n',
),
CLIOptions\flag(
() ==> {
$this->frontMatterConfig ??= shape();
},
'Include front matter in the generated markdown',
'--with-frontmatter',
),
CLIOptions\with_required_string(
$s ==> {
$fm = $this->frontMatterConfig ?? shape();
$fm['permalinkPrefix'] = $s;
$this->frontMatterConfig = $fm;
},
'Add permalinks to frontmatter with the specified prefix',
'--fm-permalink-prefix',
),
CLIOptions\with_required_string(
$s ==> {
$fm = $this->frontMatterConfig ?? shape();
$fields = $fm['constantFields'] ?? dict[];
list($key, $value) = Str\split($s, ':');
$fields[$key] = $value;
$fm['constantFields'] = $fields;
$this->frontMatterConfig = $fm;
},
'Add key:value pair to frontmatter',
'--fm-key-value',
),
];
}