ShellManual
MMO\core\classes · 1 symbole · générée le 30 Nov 2026
ShellManual
ShellManual.php:34- Espace de noms
MMO\core\classes- Implémente
- JsonSerializable
Index
| NAME_WIDTH | the widest a recap's command column gets: a longer name puts its summary on the next line | |
| entries | ||
| info | ||
| script | ||
| add($entry) | Add a command, unless one of the same name is already there. | |
| detail($entry) | The man page of $entry: its name and summary, how to type it, what it does, its arguments, its options, examples, related commands, and where it is declared. | |
| Entry($command) static | The documentation of one command, as FromApplication reads it from its attribute. | |
| find($name) | ||
| FromApplication($script, $routes) static | The manual of every shell command the application routes -- hidden ones, the interactive mode (index) and help itself left out, a command two controllers declare documented once (the first's, a… | |
| getEntries() | ||
| getScript() | ||
| jsonSerialize() | ||
| line($name, $text, $indent, $column) | $name then $text beside it in a column, wrapped with a hanging indent: the recap's line of a command, the detail's of an option. | |
| markdown() | The manual as a markdown page: a table of the commands by group, then the detail of each. | |
| match($words) | The command whose name is exactly $words, or that $words start with: cpam --help typed as help cpam extra. | |
| Package($class) static | The name of the package $class belongs to: the manifest of its longest namespace. | |
| paragraph($text, $indent) | $text wrapped to the manual's width, each line indented by $indent | |
| recap($entries, $title) | How to use the script, then every command (or $entries) by group, one line each. | |
| search($text) | The commands about $text: those whose name starts with it (edms gives every edms ...), else those whose name, group, summary, description or options hold it -- whatever the case. | |
| Spelling($key) static | How an option is typed, from its key in a command's options. | |
| suggest($text, $max) | The names closest to $text, for a command that does not exist. | |
| synopsis($entry) | How to type $entry: its words, its arguments, and its options when they are few ([options] when not). | |
| typed($command) | $command as typed: php {script} added in front of a command that does not start with php. | |
| width() | ||
| __construct($script, $entries, $info) |
Constantes1
NAME_WIDTH
the widest a recap's command column gets: a longer name puts its summary on the next line
Propriétés3
entries
- Type
- array
info
- Type
- array
script
- Type
- string
Méthodes21
add($entry)
ShellManual.php:193Add a command, unless one of the same name is already there.
detail($entry)
ShellManual.php:393The man page of $entry: its name and summary, how to type it, what it does, its arguments, its options, examples, related commands, and where it is declared.
Entry($command)
staticShellManual.php:74The documentation of one command, as FromApplication reads it from its attribute.
| $command | APIRoute | |
| retourne | null | array | null for a route that is not a command to list: not 'SHELL', hidden, index or help |
find($name)
ShellManual.php:214FromApplication($script, $routes)
staticShellManual.php:57The manual of every shell command the application routes -- hidden ones, the interactive mode (index) and help itself left out, a command two controllers declare documented once (the first's, as the first claims it).
| $script | string | |
| $routes = null | null | array | group => APIRoute[], defaults to the application's |
| retourne | ShellManual |
getEntries()
ShellManual.php:200| retourne | array | every command, in the application's order |
getScript()
ShellManual.php:205| retourne | string | the script the commands are typed with |
jsonSerialize()
ShellManual.php:480| retourne | mixed | the script, the application's info and every command |
line($name, $text, $indent, $column)
ShellManual.php:307$name then $text beside it in a column, wrapped with a hanging indent: the recap's line of a command, the detail's of an option.
markdown()
ShellManual.php:437The manual as a markdown page: a table of the commands by group, then the detail of each.
| retourne | string |
match($words)
ShellManual.php:224The command whose name is exactly $words, or that $words start with: cpam --help typed as help cpam extra.
Package($class)
staticShellManual.php:179The name of the package $class belongs to: the manifest of its longest namespace.
paragraph($text, $indent)
ShellManual.php:282$text wrapped to the manual's width, each line indented by $indent
recap($entries, $title)
ShellManual.php:356How to use the script, then every command (or $entries) by group, one line each.
search($text)
ShellManual.php:238The commands about $text: those whose name starts with it (edms gives every edms ...), else those whose name, group, summary, description or options hold it -- whatever the case.
Spelling($key)
staticShellManual.php:161How an option is typed, from its key in a command's options.
suggest($text, $max)
ShellManual.php:259The names closest to $text, for a command that does not exist.
synopsis($entry)
ShellManual.php:329How to type $entry: its words, its arguments, and its options when they are few ([options] when not).
typed($command)
ShellManual.php:345$command as typed: php {script} added in front of a command that does not start with php.
width()
ShellManual.php:271| retourne | int | the width the manual is wrapped to: the terminal's, between 60 and 120 |