WP_CLI

Runner::set_alias()privateWP-CLI 1.0

Method of the class: Runner{}

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->set_alias( $alias );
$alias (required)
-

Runner::set_alias() code WP-CLI 2.8.0-alpha

private function set_alias( $alias ) {
	$orig_config  = $this->config;
	$alias_config = $this->aliases[ $alias ];
	$this->config = array_merge( $orig_config, $alias_config );
	foreach ( $alias_config as $key => $_ ) {
		if ( isset( $orig_config[ $key ] ) && ! is_null( $orig_config[ $key ] ) ) {
			$this->assoc_args[ $key ] = $orig_config[ $key ];
		}
	}
}