WP_CLI

Completions::add()privateWP-CLI 1.0

Store individual option.

Method of the class: Completions{}

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->add( $opt );
$opt(string) (required)
Option to store.

Completions::add() code WP-CLI 2.8.0-alpha

private function add( $opt ) {
	if ( '' !== $this->cur_word ) {
		if ( 0 !== strpos( $opt, $this->cur_word ) ) {
			return;
		}
	}

	$this->opts[] = $opt;
}