OptionCommand final class
Minn\Cli\OptionCommand · public/minn/src/Minn/Cli/OptionCommand.php · 200 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. The verbs take WP-CLI's bundled synopsis (Commands); the one written here stands when this WP-CLI has none.
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' - 'yes' - 'no' --- |
| 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' - 'yes' - 'no' --- [--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.