WP_CLI
Configurator::assoc_arg_to_runtime_config()
Handle turning an $assoc_arg into a runtime arg.
Метод класса: Configurator{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
// private - только в коде основоного (родительского) класса $result = $this->assoc_arg_to_runtime_config( $key, $value, $runtime_config );
- $key (обязательный)
- -
- $value (обязательный)
- -
- $runtime_config (обязательный) (передается по ссылке — &)
- -
Код Configurator::assoc_arg_to_runtime_config() Configurator::assoc arg to runtime config WP-CLI 2.8.0-alpha
private function assoc_arg_to_runtime_config( $key, $value, &$runtime_config ) { $details = $this->spec[ $key ]; if ( isset( $details['deprecated'] ) ) { fwrite( STDERR, "WP-CLI: The --{$key} global parameter is deprecated. {$details['deprecated']}\n" ); } if ( $details['multiple'] ) { $runtime_config[ $key ][] = $value; } else { $runtime_config[ $key ] = $value; } }