OptionCommand final class
Minn\Cli\OptionCommand · public/minn/src/Minn/Cli/OptionCommand.php · 185 lines
Options, read and written straight to the options table. Serialized values are decoded by the engine's own reader, and arrays written back in the stored form.
Public
| method | get(array $args, array $assocArgs): void# | Gets the value for an option. ## OPTIONS <key> : Key for the option. [--format=<format>] : Get value in a particular format. --- default: var_export options: - var_export - json - yaml --- |
| method | add(array $args, array $assocArgs): void# | Adds a new option value. ## OPTIONS <key> : The name of the option to add. [<value>] : The value of the option to add. If omitted, the value is read from STDIN. [--format=<format>] : The serialization format for the value. --- default: plaintext options: - plaintext - json --- [--autoload=<autoload>] : Should this option be automatically loaded. --- options: - 'on' - 'off' --- |
| method | update(array $args, array $assocArgs): void# | Updates an option value. ## OPTIONS <key> : The name of the option to update. [<value>] : The new value. If omitted, the value is read from STDIN. [--autoload=<autoload>] : Requires WP 4.2. Should this option be automatically loaded. --- options: - 'on' - 'off' --- [--format=<format>] : The serialization format for the value. --- default: plaintext options: - plaintext - json --- |
| method | delete(array $args, array $assocArgs): void# | Deletes an option. ## OPTIONS <key>... : Key for the option. |
Internals 3
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
Nothing matches.